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. 安装好这个包之后,显示这个画面
在这里插入图片描述

以下为插件的相关介绍,或许可以通过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
或许需要可续上网。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值