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

Mark Koennecke Mark.Koennecke at psi.ch
Tue Mar 30 10:05:40 BST 2004



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.  

                                Best Regards,

                                   Mark Koennecke






More information about the NeXus mailing list