How to get character encoding for netCDF attributes
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello guys,
I have to write global attributes in netCDF files that may contains some special characters (such as "à" and "é" coming from french words). However, the encoding of these characters differ from a system to another. For instance, on my Windows desktop, Matlab seems to encode the characters using Windows-1252 and on a different system on Unix, Matlab writes them in UTF-8 (even if feature('DefaultCharacterSet') return "US-ASCII" in that case). It results that I can get weird characters when I read attributes that were written on an other system.
So, I would like to know if there is a way to know what character encoding Matlab will use (or was used) to write netCDF attributes and if it is possible to select the character encoding to read/write these attributes with Matlab.
1 comentario
Walter Roberson
el 17 de Abr. de 2019
It looks like it is a complicated matter: https://github.com/Unidata/netcdf-c/issues/402
Respuestas (1)
Ver también
Categorías
Más información sobre NetCDF en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!