Friday, July 27, 2012

UTF8 support under Windows in SublimeText2

SublimeText2 has a great problem with guessing encoding under Windows system. It tries to use CP1252 instead of CP1250 (for my locals:)) by default. I strongly suggest installing a package manager for SublimeText2. And then installing a encoding helper plugin. I also recommend (If you are a Central-European nation) changing a fallback_encoding property in: Preferences->Settings- Default to a Central European (Windows 1250).
A list of possible values:
st_encodings_list = [
   "UTF-8",
   "UTF-8 with BOM",
   "UTF-16 LE",
   "UTF-16 LE with BOM",
   "UTF-16 BE",
   "UTF-16 BE with BOM",
   "Western (Windows 1252)",
   "Western (ISO 8859-1)",
   "Western (ISO 8859-3)",
   "Western (ISO 8859-15)",
   "Western (Mac Roman)",
   "DOS (CP 437)",
   "Arabic (Windows 1256)",
   "Arabic (ISO 8859-6)",
   "Baltic (Windows 1257)",
   "Baltic (ISO 8859-4)",
   "Celtic (ISO 8859-14)",
   "Central European (Windows 1250)",
   "Central European (ISO 8859-2)",
   "Cyrillic (Windows 1251)",
   "Cyrillic (Windows 866)",
   "Cyrillic (ISO 8859-5)",
   "Cyrillic (KOI8-R)",
   "Cyrillic (KOI8-U)",
   "Estonian (ISO 8859-13)",
   "Greek (Windows 1253)",
   "Greek (ISO 8859-7)",
   "Hebrew (Windows 1255)",
   "Hebrew (ISO 8859-8)",
   "Nordic (ISO 8859-10)",
   "Romanian (ISO 8859-16)",
   "Turkish (Windows 1254)",
   "Turkish (ISO 8859-9)",
   "Vietnamese (Windows 1258)",
   "Hexadecimal"
]

No comments: