-
Notifications
You must be signed in to change notification settings - Fork 288
Open
Description
As discussed here Unidata/netcdf4-python#654 (comment), there is a need for conventions to specify the encoding of strings and character arrays in netcdf.
There is also a need to specify whether char arrays in NetCDF3 contain strings or character arrays.
@BobSimons addressed these issues in an enhancement to CF conventions that would specify charset for NetCDF3 and _Encoding for NetCDF4, and the Unidata gang (@DennisHeimbigner, @WardF, @ethanrd and @cwardgar) agreed with the concept, but suggested this be handled in the NUG and we came up with this slightly different proposal that would still accomplish Bob's goals of making it easy for software to figure out what is stuffed in those char or string arrays!
Proposal:
- Use
_CharTypevariable attribute with allowed values['STRING', 'CHAR_ARRAY']to specify if achararray variable should be interpreted as a string or as an array of individual characters. If_CharTypeis missing, default is'STRING'. - Use
_Encodingvariable attribute with allowed values['ISO-8859-1', 'ISO-8859-15', 'UTF-8']to specify the encoding. If_Encodingis missing for_CharType='STRING', default is'UTF-8'. If_Encodingis missing for_CharType='CHAR_ARRAY', default is'ISO-8859-15'.
Metadata
Metadata
Assignees
Labels
No labels