• 使用Emeditor转换编码(ShiftJS 到 UTF8)


    只是一次为了转换日文源码到中文源码时想到的.:-)

    /////////////////////日语编码2UTF-8.jsee////////////////////////////

    var fso = new ActiveXObject("Scripting.FileSystemObject");
    var oFolder = fso.GetFolder(prompt( "Folder", ""));
    fc = new Enumerator(oFolder.files);
    for (; !fc.atEnd(); fc.moveNext())
    {
        var filePath = fc.item();
        var oFile = fso.GetFile(filePath);
        // Set property of file to normal
        oFile.Attributes = 0;
        if (oFile.Name.search(/.+\.h/i) == 0 || oFile.Name.search(/.+\.cpp/i) == 0 || oFile.Name.search(/.+\.txt/i) == 0)
        {
            // Open At Japanese (Auto-Select)
            editor.OpenFile(filePath, 50932, eeOpenAllowNewWindow);
            // Save At UTF-8
            editor.ExecuteCommandByID(4255);
            document.close();
        }
    }

  • 相关阅读:
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
  • 原文地址:https://www.cnblogs.com/dongzhiquan/p/1994569.html
Copyright © 2020-2023  润新知