[Python-3000] text editors
solipsis at pitrou.net
Tue Sep 12 08:37:58 CEST 2006
Le lundi 11 septembre 2006 à 18:16 -0700, Paul Prescod a écrit :
> On Unix, VIM is also set up to auto-detect UTF-8 (using the BOM or
> full decoding attemption). According to Google, XEmacs also has some
> kind of UTF-8/BOM detector but I don't know the details. GNU Emacs:
> According to "Emacs wiki": "Auto-detection of UTF-8 is effectively
> disabled by default in GNU Emacs 21.3 and below."
> So the situation on Unix is not as clear.
gedit has an ordered list of encodings to test for when it opens a file,
and it chooses the first encoding which succeeds in decoding the file.
The encoding list is stored as a gconf key named "auto_detected"
in /apps/gedit-2/preferences/encodings, and it's default value is
[UTF-8, CURRENT, ISO-8859-15]
("CURRENT" being interpreted as the current locale).
I suppose the explicit fallback to iso-8859-15 is for the common case
where the user has a Western European language, his user locale is utf-8
and he has some non-Unicode files hanging around...
More information about the Python-3000