Main Content

H5T.set_cset

Set character dataset for string data type

Syntax

H5T.set_cset(type_id,cset)

Description

H5T.set_cset(type_id,cset) sets the character encoding used to create strings. Specify cset as 'H5T_CSET_ASCII', or its equivalent numerical value.

Examples

type_id = H5T.copy('H5T_C_S1');
H5T.set_size(type_id,10);
encoding = H5ML.get_constant_value('H5T_CSET_ASCII');
H5T.set_cset(type_id,encoding);

See Also