sublime text2 build时的编码出错

1、build时控制台出现


[Decode error - output not utf-8]

解决办法,打开

C:\Users\用户名\AppData\Roaming\Sublime Text 2\Packages\User\您的编译配置文件

增加"encoding":"cp936"


{
"cmd": [
"D:\\flex_sdk_4.6.0.23201B\\bin\\mxmlc.exe",
//"-o", "${project_base_name}.swf",
"${file}"
],
"selector": "source.actionscript",
"encoding": "cp936"
}


2、当前代码文件在中文目录时候,编译出错时


打开:

C:\Users\liqun\AppData\Roaming\Sublime Text 2\Packages\Default\exce.py

修改


proc_env[k] = os.path.expandvars(v).encode(sys.getfilesystemencoding())



proc_env[k] = os.path.expandvars(v.decode(sys.getfilesystemencoding())).encode(sys.getfilesystemencoding())

self.proc = subprocess.Popen(arg_list, stdout=subprocess.PIPE,
前增加

for index in range(len(arg_list)):
   arg_list[index]=arg_list[index].encode(sys.getfilesystemencoding())


你可能感兴趣的:(sublime text2 build时的编码出错)