Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write string attributes as a string #79

Closed
LTLA opened this issue Jan 30, 2021 · 2 comments · Fixed by #80
Closed

Write string attributes as a string #79

LTLA opened this issue Jan 30, 2021 · 2 comments · Fixed by #80

Comments

@LTLA
Copy link
Contributor

LTLA commented Jan 30, 2021

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.

@TriLe965
Copy link

Is this issue resolved? I'm trying to write an actual string with h5writeAttributes but it seems impossible.

@grimbough
Copy link
Owner

Thanks for the pull request @LTLA That's now been merged and should be available in version 2.35.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants