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

Datatype of char[][N]. #865

Open
1uc opened this issue Nov 24, 2023 · 0 comments
Open

Datatype of char[][N]. #865

1uc opened this issue Nov 24, 2023 · 0 comments
Labels
v3 Anything that needs to be resolved before `v3`.

Comments

@1uc
Copy link
Collaborator

1uc commented Nov 24, 2023

It's seems that a C array of C-string constants is serialized as an array of signed 8-bit ints. See,

$ h5dump -R build-2.5.1/tests/unit/h5_rw_vec_shortcut_test.h5
HDF5 "build-2.5.1/tests/unit/h5_rw_vec_shortcut_test.h5" {
GROUP "/" {
   DATASET "TmpCArray2dchar" {
      DATATYPE  H5T_STD_I8LE
      DATASPACE  SIMPLE { ( 4, 3 ) / ( 4, 3 ) }
      DATA {
      (0,0): 97, 97, 0,
      (1,0): 98, 98, 0,
      (2,0): 99, 99, 0,
      (3,0): 49, 50, 0
      }
   }

This behaviour might be older than 2.5.1. We should review why this choice was made and if we can't find a good one make it serialize to something string-ish.

@1uc 1uc added the v3 Anything that needs to be resolved before `v3`. label Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3 Anything that needs to be resolved before `v3`.
Projects
None yet
Development

No branches or pull requests

1 participant