diff -Naur sciteorig/src/SciTEBase.h scite/src/SciTEBase.h --- sciteorig/src/SciTEBase.h 2004-09-26 11:14:09.000000000 +0200 +++ scite/src/SciTEBase.h 2005-01-04 19:16:29.045375000 +0100 @@ -157,7 +157,7 @@ // Related to Utf8_16::encodingType but with additional values at end enum UniMode { uni8Bit=0, uni16BE=1, uni16LE=2, uniUTF8=3, - uniCookie=4 + uniCookie=4, uni8BitSJIS=5 }; // State of folding in a given document, remembers line/state pairs, diff -Naur sciteorig/src/SciTEIO.cxx scite/src/SciTEIO.cxx --- sciteorig/src/SciTEIO.cxx 2004-07-22 15:40:10.000000000 +0200 +++ scite/src/SciTEIO.cxx 2005-01-04 19:19:36.686000000 +0100 @@ -378,6 +378,8 @@ code.lowercase(); if (code == "utf-8") { return uniCookie; + } else if (code == "sjis") { + return uni8BitSJIS; } } } @@ -479,14 +481,19 @@ unicodeMode = CookieValue(l2); } } - if (unicodeMode != uni8Bit) { + if (unicodeMode == uniCookie) { // Override the code page if Unicode codePage = SC_CP_UTF8; + } else if (unicodeMode == uni8BitSJIS) { + codePage = 932; + characterSet = 128; + unicodeMode = uni8Bit; } else { codePage = props.GetInt("code.page"); } + ReadFontProperties(); SendEditor(SCI_SETCODEPAGE, codePage); - + if (props.GetInt("eol.auto")) { DiscoverEOLSetting(); }