Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Datatype of char[][N]. #865

@1uc

Description

@1uc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    v3Anything that needs to be resolved before `v3`.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions