win10 sublime Text中文 逗号 不识别——软件包管理

今天在win10 的平台上使用 sublime Text 在写入**,**时,被识别为一个无效字符。然后搜索发现需要安装 ConverToUTF-8 。

  1. 首先需要安装 包管理器
import urllib.request,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaeeebe013ee18cced0ef93d5f746d80ef60'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)

有可能需要可续上网。否则就是程序的一段时间卡死。
点击Package Control,上面会出来一个输入框,我们输入install,就会自动有提示那个install package,我们点击一下install package,输入框会消失,稍等一下又会弹出个输入框。
2. 有了包管理器,然后就安装包 选择 Package Control,输入install,选择 install package。过了一会儿。
3. 弹出一个输入框——输入需要安装的那个插件包(ConvertToUTF8)
4. 安装好这个包之后,显示这个画面
win10 sublime Text中文 逗号 不识别——软件包管理_第1张图片

以下为插件的相关介绍,或许可以通过GitHub安装它。

ConvertToUTF8

ConvertToUTF8 ================== With this plugin, you can edit
and save the files which encodings are not supported by Sublime Text
currently, especially for those used by CJK users, such as GB2312,
GBK, BIG5, EUC-KR, EUC-JP, etc.
Configuration ------------------ Please check ConvertToUTF8.sublime-settings file for details. You should save your
personal settings in a file named “ConvertToUTF8.sublime-settings”
under “User” folder.
* encoding_list: encoding selection list when detection is failed * max_cache_size: maximum encoding cache size, 0 means no cache (default: 100) * max_detect_lines: maximum detection lines, 0 means
unlimited (default: 600) * preview_action: converting the file’s
content to UTF-8 when previewing it (default: false) *
default_encoding_on_create: specific the default encoding for newly
created file (such as “GBK”), empty value means using sublime text’s
“default_encoding” setting (default: ‘’) * convert_on_load: convert
the file’s content to UTF-8 when it is loaded (default: true) *
convert_on_save: convert the file’s content from UTF-8 to its original
(or specific) encoding when it is saved (default: true) *
convert_on_find: convert the text in Find Results view to UTF-8
(default: false) * lazy_reload: save file to a temporary location,
and reload it in background when switching to other windows or tabs
(default: false)
Contact me ------------------ Please send me your questions or suggestions: sunlxy (at) yahoo.com or http://weibo.com/seanliang
For more information, please visit: https://github.com/seanliang/ConvertToUTF8

参考:https://www.cnblogs.com/yjd_hycf_space/p/7486204.html
或许需要可续上网。

你可能感兴趣的:(解决问题)