Encoding in Kate
Encoding in Kate
Posted Jun 13, 2006 9:16 UTC (Tue) by piman (guest, #8957)In reply to: Encoding in Kate by halla
Parent article: Gedit Review (Softpedia.com)
Autodetecting UTF-8 is pretty easy, since very few valid sequences are valid UTF-8. So UTF-8, fallback to locale encoding, is very effective. If a UTF-8 or UTF-16 BOM is present, it's also almost always right (though ugly).
When downloading web pages, detecting the encoding is very easy, the server gives it (if the server is wrong, it's not your editor's fault, and it will be right more often than not).
It's only when forced to choose between old legacy encodings (Latin 1 versus Latin 2, for example) that it becomes difficult-to-impossible to guess the encoding.
The final good solution is to assume everything is UTF-8 unless otherwise specified and force the last legacy users to migrate to something sane. This is often best on a multiuser system where LC_CTYPE won't apply outside the current user's /home resources.
