Mike, a dataset of vlen strings is represented in memory as an array of pointers (=char**). I believe your data argument has the wrong type, and you should make sure to size that pointer array accordingly. G.
The issue ended up being we were not querying the character set type from the data set that was going to be read. Once we got that value, set it into the datasetId and then read the string data things started working correctly.
Interesting. Since ASCII is a proper subset of UTF-8, for something like “Aluminum”, I would not have expected any difference between the byte representations of the ASCII- and UTF-8 -encoded variants. Off the top of my head, I don’t know how H5Dread behaves if you try to read a dataset of UTF-8-encoded strings into a dataset of ASCII-encoded strings. For vlen strings, the library may just give you the bytes and you are free to misinterpret them. For fixed-length strings there is a potential truncation issue for multi-byte code points. I don’t know if the library just copies what fits, or if that’d be treated as a datatype conversion error. G.
I have exactly the same problem. I am not sure to understand correctly your solution. I tried to implement it setting the data set type to the read type (datasetid) but it still not work.
Would you agree to share your corrected C code?
I have already lost days with this stupid problem.
I have exactly the same problem. If I understand correctly, you solved the problem. I tried to apply your solution set type from data to memory type (datasetid) but without any success.
Would you agree to share your corrected C code?
I have already lost days trying to solve this stupid problem.