G-Node / nix

Neuroscience information exchange format
https://readthedocs.org/projects/nixio/
Other
66 stars 36 forks source link

UTF-8 for strings #779

Closed gicmo closed 4 years ago

gicmo commented 5 years ago

By default strings are encoded as ASCII in HDF5. NIXPY already marks strings as UTF-8 (because h5py automatically does so) and for 1.5 I think we should do the same in NIX. From the aforementioned doc:

lcpl_id =    H5Pcreate(H5P_LINK_CREATE) ;
error =      H5Pset_char_encoding(lcpl_id, H5T_CSET_UTF8) ;
dataset_id = H5Dcreate2(group_id, "datos_ñ", datatype_id, dataspace_id, lcpl_id, H5P_DEFAULT, H5P_DEFAULT) ;