V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
bbxiong
V2EX  ›  问与答

sublime 编辑 gbk 编码代码配合 ConvertToUTF8 频繁报错造成文件乱码

  •  
  •   bbxiong · Oct 29, 2017 · 2437 views
    This topic created in 3102 days ago, the information mentioned may be changed or developed.

    GBK 编码的文件,ConvertToUTF8 转换正常,但有时会造成文件乱码,乱码后 ctrl +z 恢复正常,但是 ctrl+s 保存后又变成乱码,必须关闭文件重新打开才能彻底恢复,请教下需要什么特殊设置么》

    6 replies    2017-10-29 17:48:37 +08:00
    greatbody
        1
    greatbody  
       Oct 29, 2017
    推荐一波 vscode,原生支持各种类型编码
    bbxiong
        2
    bbxiong  
    OP
       Oct 29, 2017
    vscode 符号跳转 不支持中文函数,sublime 修改语法正则就能支持符号跳转查找
    techmale
        3
    techmale  
       Oct 29, 2017 via Android
    安装 GBK support 这个预览问题
    至于转换 我一般是 : 以 GBK 编码打开 再将其编码设置为 UTF-8 然后再保存即可。( 这两步操作均在 菜单栏 File 下)
    这样有些麻烦 你可以尝试自己写个插件
    techmale
        4
    techmale  
       Oct 29, 2017 via Android
    这个 => 解决这个看下

    或者看下 ConvertToUTF8 的代码
    techmale
        5
    techmale  
       Oct 29, 2017 via Android
    多了俩字。。
    bbxiong
        6
    bbxiong  
    OP
       Oct 29, 2017
    文件编码必须 gbk,麻烦就在这里
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1220 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 17:56 · PVG 01:56 · LAX 10:56 · JFK 13:56
    ♥ Do have faith in what you're doing.