When using h5writeAttributes, it seems that we end up with arrays of fixed-width strings (probably H5T_C_S1?). This confuses other HDF5 readers that expect an actual string (usually one of the H5T_CSET options).
It seems like it would be generally useful to include an encoding= option in h5writeAttributes that allows us to switch to ASCII or UTF-8 when a length-1 character vector is supplied. A similar option might also be useful for h5writeDataset as well. For all other character vectors, this argument can be ignored, with a warning, or we can error out and say that they can't do that.
When using
h5writeAttributes
, it seems that we end up with arrays of fixed-width strings (probablyH5T_C_S1
?). This confuses other HDF5 readers that expect an actual string (usually one of theH5T_CSET
options).It seems like it would be generally useful to include an
encoding=
option inh5writeAttributes
that allows us to switch to ASCII or UTF-8 when a length-1 character vector is supplied. A similar option might also be useful forh5writeDataset
as well. For all other character vectors, this argument can be ignored, with a warning, or we can error out and say that they can't do that.