以前にもtexteditorのShift-JISの文字化けの対処法を書いているが,バージョンの変更に伴い構成も変わっていたのでVer. 8.1.1での文字化けの対処法を記録しておく。
変更内容は以前の対処法と変わりないが,書き換えるファイルが
OC/apps/files_texteditor/controller/filehandlingcontroller.php
となった。このファイルに次のように”SJIS-win”を追加する
$encoding = mb_detect_encoding($filecontents . "a", "UTF-8, WINDOWS-1252, ISO-8859-15, ISO-8859-1, ASCII", true); ↓ $encoding = mb_detect_encoding($filecontents . "a", "SJIS-win, UTF-8, WINDOWS-1252, ISO-8859-15, ISO-8859-1, ASCII", true);