[Nexus] NXgetinfo for NX_CHAR datasets (HDF5 ONLY!!)

Hartmut Gilde Hartmut.Gilde at frm2.tum.de
Tue Mar 30 10:31:46 BST 2004


Am Dienstag, 30. März 2004 11:05 schrieb Mark Koennecke:
> Dear Hartmut Gilde,
>
> On Mon, 29 Mar 2004, Hartmut Gilde wrote:
> > > > i forgot to mention, that the behaviour of NXgetinfo for NX_CHAR
> > > > datasets described above only arises when using HDF5 as the
> > > > underlying Format. With HDF4, NXgetinfo returns exactly what we would
> > > > expect.
> >
> > int i, NXrank, NXdims[32], NXtype;
> > int dims[2] = {2, 4};
> > char teststring[2][4] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h' };
> > .
> > .
>
>   Here is the problem. If I'am not mistaken NX_CHAR was always for single
>   0 terminated string only, not for arrays of characters. The NeXus
>   standard does not use n-dimensional arrays of strings anywhere. So, I am
>   not sure if we need to fix this. Especially as it was decided to
>   implement unicode for strings in some near future.  It is not easy to
>   fix either, BTW. What does anybody else think?
>
>   There is a workaround: If you need multi-dimensional arrays of bytes,
>   use NX_UINT8 or NX_INT8.

Ok. Glad to hear this. 
This saves some work and makes obsolete some work already done. 
Nevertheless, I had this in mind, but wasn't sure if its really safe to wire 
my assumptions into the source code. Moreover its a little confusing, as with 
HDF4 everything works pretty perfect.

So again, its better asking before :-)
Thanks a lot.

Hartmut Gilde 





>                                 Best Regards,
>
>                                    Mark Koennecke
>
>
>
>
> _______________________________________________
> NeXus mailing list
> NeXus at anl.gov
> http://www.neutron.anl.gov/mailman/listinfo/nexus






More information about the NeXus mailing list