> @ajelenak-thg said:  In the HDF5 case, string encoding is an intrinsic part 
> of the HDF5 string datatype and can only be ASCII or UTF-8.  Both char and 
> string datatypes in the context of this discussion are stored as HDF5 strings.

Actually the ASCII/UTF-8 restriction is not enforced by the HDF5 library.  This 
is used intentionally by netcdf developers to support arbitrary character sets 
in netcdf-4 data type **`char`**, both attributes and variables.  See netcdf 
issue [298](https://github.com/Unidata/netcdf-c/issues/298).  Therefore, data 
type **`char`** remains fully interoperable between netcdf-3 and netcdf-4 
formats.

For example, 
[this](https://github.com/cf-convention/cf-conventions/files/2230157/iso-8859-1.nc4.gz)
 netcdf-4 file contains a **`char`** attribute and a **`char`** variable in an 
alternate character set.  You will need an app or console window enabled for 
ISO-8859-1 to properly view the ncdump of this file.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/cf-convention/cf-conventions/issues/141#issuecomment-407954242

Reply via email to