修改 Windows 命令提示字元 (cmd) 預設頁碼
Change default code page of Windows cmd
今天嘗試利用 Sublime 跑 JSHint 的時候出現以下 Error
[Decode error — output not utf-8]
看起來是個 encoding 問題,且由於這個 plugin 是直接跑 cmd 來執行 jshint,嘗試修改 cmd 的 encoding 為 UTF8 應該是可以解決。
HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe\CodePage
將其值改為 fde9 (十六進位) 或 65001 (十進位)
重新開啟 cmd 輸入 chcp 或是進入內容分頁查看是否已經成功修改。Sublime 也要記得重開才能使用到新的頁碼。
http://stackoverflow.com/questions/14109024/how-to-make-unicode-charset-in-cmd-exe-by-default
http://wingwild.tumblr.com/post/32052422228/sublime-text-2-build-system
Email me when Jack Yu publishes or recommends stories