Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.2k
add **encoding** argument in netCDF4 backend#10372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…ile with non-ASCII path or filename and keep consistent behavior with upstream netcdf4 library
Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient. |
for more information, seehttps://pre-commit.ci
dcherian commentedMay 29, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Nice, can you add a test here please? xarray/xarray/tests/test_backends.py Line 2037 ind589df1
It can simply roundtrip a simple dataset to a file with a filename that doesn't work today. |
How is this handled in the light of this comment#9282 (comment) by@dcherian? |
Hah! Probably good to use |
addencoding argument in netCDF4 backend to support reading NetCDF file with non-ASCII path or filename.
The behavior is consistent with upstream netCDF4 library, default path encoding is set to
sys.getdefaultfileencoding()
.encoding
parameter when reading netCDF files with xarray #10357Cannot read a nc file that contains the diacritic mark tilde (á) in the path #8531