use errors='surrogateescape' in chartostring and stringtochar, force 'U' dtype in chartostring.
use errors='surrogateescape' in chartostring and stringtochar,
force 'U' dtype in chartostring.

Unidata/netcdf4-python,Unidata/netcdf4-python,Unidata/netcdf4-python