You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
filename is encoded to utf8, resulting in broken filenames on windows #686
When i try to create a netcdf-file with a filepath, that contains Non-ASCII-characters, Netcdf4 creates broken filenames on windows, because it encodes the filepath in UTF8, which is fine for Linux,. In Windows, the filepath has to be convertet to CP1252.
Reopening this - tst_filepath.py is failing on systems with default encoding of 'utf-8'. The only reason the travis tests passed is that this test was skipped since the version of the netcdf library is so old.
======================================================================
ERROR: test_filepath_with_non_ascii_characters (__main__.test_filepath)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tst_filepath.py", line 23, in test_filepath_with_non_ascii_characters
assert nc_non_ascii.filepath() == str(nc_non_ascii_file)
File "netCDF4/_netCDF4.pyx", line 1953, in netCDF4._netCDF4.Dataset.filepath
(netCDF4/_netCDF4.c:15031)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 49: ordinal not in range(128)
Activity
Merge pull request #687 from MaxBo/master
jswhit commentedon Jul 5, 2017
Reopening this - tst_filepath.py is failing on systems with default encoding of 'utf-8'. The only reason the travis tests passed is that this test was skipped since the version of the netcdf library is so old.
Revert "fixes #686 Encode filename with sys.getfilesystemencoding() m…