zoukankan      html  css  js  c++  java
  • sublime text 3 乱码

    sublime text 是一款很好用的文字编辑软件,可谓是程序员必备,但是最近发现在mac端使用的时候,中文乱码,

    网上一些解决方案,抄袭严重,没有解决实际问题,所以记录下自己解决问题的过程。

    1、打开Sublime Text 3,按windows:Ctrl+~mac:control+~打开控制行,复制粘贴以下python代码,然后回车运行。

    import urllib.request,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404e330c659d4bb41d3bdf022e94cab3cd0'; 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://sublime.wbond.net/' + 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)  

    2、重启Sublime Text 3。

    3、按windows:Ctrl+Shift+Pmac:command+shift+P打开命令行,输入Install Package,回车,然后继续输入ConvertToUTF8,回车。

    可是安装后打开本地文件还是错误。

     原来是缺少Codecs,所以在此打开命令行-->输入Install Package-->Codecs

    重启Sublime Text 3,打开乱码文件 按下ctrl+shift+c

    作者:Darren

    微博:@IT_攻城师

    github:@Darren90

    出处:http://www.cnblogs.com/fengtengfei/

  • 相关阅读:
    gcc数据对齐之: howto 2.
    gcc数据对齐之: howto 1.
    gcc数据结构对齐之:why.
    linux tricks 之 BUILD_BUG_ON_ZERO.
    linux tricks 之 FIELD_SIZEOF.
    linux tricks 之 container_of.
    linux tricks 之 bitmap分析.
    linux tricks 之 roundup.
    Windows之svn问题
    Embeded linux之地址映射
  • 原文地址:https://www.cnblogs.com/fengtengfei/p/4136364.html
Copyright © 2011-2022 走看看