解決Sublime Text 3中文顯示亂碼(tab中文方塊)問題,sublime tab亂碼

1、文本出現中文亂碼問題

一、打開Sublime Text 3,按Ctrl+~打開控制行,複製粘貼如下python代碼,而後回車運行。python

2. 複製並粘貼以下代碼:app

Python代碼   收藏代碼
  1. import urllib.request,os,sys; exec("if sys.version_info < (3,) or os.name != 'nt': raise OSError('This code is for Windows ST3 only!')"); pr='Preferences.sublime-settings'; ip='ignored_packages'; n='Package Control'; s=sublime.load_settings(pr); ig=s.get(ip); ig.append(n); s.set(ip,ig); sublime.save_settings('Preferences.sublime-settings'); pf=n+'.sublime-package'; urllib.request.install_opener(urllib.request.build_opener(urllib.request.ProxyHandler())); by=urllib.request.urlopen('https://packagecontrol.io/'+pf.replace(' ','%20')).read(); open(os.path.join(sublime.installed_packages_path(),pf),'wb').write(by); ig.remove(n); s.set(ip,ig); sublime.save_settings(pr); print('Package Control: 3.0.0 upgrade successful!')  

 

二、重啓Sublime Text 3。
三、按Ctrl+Shift+P打開命令行,輸入Install Package,回車,而後繼續輸入ConvertToUTF8,回車。
等安裝好了之後,應該問題就解決了,若是仍是不行,再按照安裝ConvertToUTF8的方式安裝GBK Encoding Support,就行了。

 

轉自:http://blog.csdn.net/china_chenxing/article/details/18841641 (親試有效)ui

 

2、tab中文出現方塊問題:

在sublime text 3中,Preference, Settings-User,添加:url

寫道
"dpi_scale": 1.0,

 

個人Settings-User配置:spa

寫道
{
"dpi_scale": 1.0,
"font_face": "Consolas",
"font_size": 17,
"ignored_packages":
[
"Vintage"
],
"line_padding_bottom": 1,
"line_padding_top": 1,
"tab_size": 4,
"translate_tabs_to_spaces": true,
"word_wrap": "true"
}

 

--end.net

相關文章
相關標籤/搜索