String padding on fixed length strings

Hi All,

When I look at my string data from the H5 file under pytables, I’mgetting padding like so:

b’some_value\x00\x00\x00\x00\x9d\xf8\x8enl\x

I am using fixed length strings as it is a rquirement for the project. I get the result I want with variable string lengts but unable to use H5T_VARIABLE. I was just wondering how to get rid of the padding and just show the data I want shown. Thisis probably a python question.

I’m setting up my string thisway:

hid_t strtype = H5TCopy(H5T_C_S1)
H5Tset_size(strtype,36);
H5Tset_strpad(strtype, H5T_STR_NULLTERM);

Hopefullysomeonemay guideme in the right direction,

Regards,
/P

How about H5Tset_strpad(strtype, H5T_STR_NULLPAD);? https://portal.hdfgroup.org/display/HDF5/H5T_SET_STRPAD

G.