recognize _Encoding attribute for char and string arrays #665
Add check for
Use 'utf-8' and 'replace' for everything except NC_STRING variable data. For NC_STRING variable data, look for _Encoding variable attribute, otherwise use 'utf-8'.
force 'U' dtype in chartostring.
to a char variable with _Encoding set.
character array (type='S1') is given
@shoyer, I'm wondering how this change would impact xarray - especially the auto-conversion of char arrays to string arrays with the last dimension collapsed. This would only happen if the
last dim of char variable.
@jswhit thanks for the heads up. Yes, I think this implementation as-is would break xarray, where we do our own char -> string array conversion.
There are two ways to fix this:
I like this second option better.
The second option would be nice, but quite difficult since
How about adding a