def recordStringInHDF5(h5file, group, nodename, s, complevel=5, complib='zlib'
    ):
    """creates a CArray object in an HDF5 file 
    that represents a unicode string"""
bytes = np.fromstring(s.encode('utf-8'), np.uint8)
atom = pt.UInt8Atom()
filters = pt.Filters(complevel=complevel, complib=complib)
ca = h5file.create_carray(group, nodename, atom, shape=(len(bytes),),
    filters=filters)
ca[:] = bytes
return ca
How do you create a compressed dataset in pytables that can store a Unicode string?