bbxiong
V2EX  ›  问与答

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

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

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