How to get character encoding for netCDF attributes
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Walter Roberson
2019 年 4 月 17 日
It looks like it is a complicated matter: https://github.com/Unidata/netcdf-c/issues/402
回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で NetCDF についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!