[Hdf-forum] HDF5 1.8.4 & String attribute with fortran

Elena Pourmal epourmal at hdfgroup.org
Fri Jan 15 20:43:36 EST 2010


Cyril,

Are you using HL Fortran APIs? if so, it is a deficiency of the current API. The API is a wrapper around C HL API that uses H5T_S_C1 datatype; fortran wrapper modified user's buffer by adding \0 character (yes, very bad....) We have bug filed and hopefully will resolve it for the 1.8.5 release.

If you are using regular HDF5 Fortran APIs, please send me a program that demonstrates the problem (i.e., your fortran data is modified with trailing \0).

Thank you!

Elena
On Jan 13, 2010, at 8:45 AM, Giraudon Cyril wrote:

> Hello,
> 
> I use HDF5 1.8.4  compiled with ifort 11.1 on a linux Ubuntu 9.04 box.
> 
> If I write a string attribute in fortran, then when I read it the string
> is terminated with an invisible null character.
> So it is very difficult to deal with it (concatanation is very
> hasardeous for instance).
> 
> Is it a bug or the right behaviour ?
> 
> Thanks a lot,
> 
> Cyril.
> 
> 
> 
> Note :
> If I write a string attribute in python/pytables, then when I read it
> the string is NOT  terminated with an invisible null character.
> 
> 
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> Hdf-forum at hdfgroup.org
> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org




More information about the Hdf-forum mailing list