Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] Add a new "locale" codec?

Victor Stinnervictor.stinner at haypocalc.com
Thu Feb 9 10:30:11 CET 2012


> I think there's a general expectation that if you encode something> with one codec you will be able to decode it with the same codec.> That's not necessarily true for the locale encoding.There is the same problem with the filesystem encoding(sys.getfilesystemencoding()), which is the user locale encoding(LC_ALL, LANG or LC_CTYPE)  or the Windows ANSI code page. If youwrote a file using this encoding, you may not be able to read it ifthe filesystem encoding changes between two run, or on anothercomputer.I agree that it is more surprising because the current locale encodingcan change anytime, not only between two runs or when you use anothercomputer.Don't you think that this special behaviour can be documented?Victor


More information about the Python-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp