h5py>=3.0 string API change
String datasets (fixed or variable length) are read as bytes:
# group[name] = "string" or group[name] = b"bytes"
try:
value = group[name].asstr()[()] # str
except UnicodeDecodeError:
value = group[name][()] # bytes
The default encoding of asstr
is dataset.id.get_type().get_cset()
(ascii or utf8).