Mac下Sublime text2中文亂碼問題的解決

 

    • 打開sublime text2,按Ctrl+~調出console
    • 粘貼如下代碼到底部命令行並回車:
      import urllib2,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path();os.makedirs(ipp) if not os.path.exists(ipp) else None;open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read())
    • 重啓Sublime Text 2。
    • 若是在Perferences->package settings中看到package control這一項,則安裝成功。
    • 按下Cmd+Shift+P調出命令面板
    • 輸入install 調出 Install Package 選項並回車
    • 輸入ConvertToUTF8,回車便可
相關文章
相關標籤/搜索