add utf-8 output support

This commit is contained in:
virusdefender 2017-04-29 18:29:40 +08:00
parent 920b931681
commit 71cfed21d1

View File

@ -1,6 +1,9 @@
# coding=utf-8 # coding=utf-8
from __future__ import unicode_literals from __future__ import unicode_literals
default_env = ["LANG=en_US.UTF-8", "LANGUAGE=en_US:en", "LC_ALL=en_US.UTF-8"]
c_lang_config = { c_lang_config = {
"compile": { "compile": {
"src_name": "main.c", "src_name": "main.c",
@ -13,6 +16,7 @@ c_lang_config = {
"run": { "run": {
"command": "{exe_path}", "command": "{exe_path}",
"seccomp_rule": "c_cpp", "seccomp_rule": "c_cpp",
"env": default_env
} }
} }
@ -42,7 +46,8 @@ cpp_lang_config = {
}, },
"run": { "run": {
"command": "{exe_path}", "command": "{exe_path}",
"seccomp_rule": "c_cpp" "seccomp_rule": "c_cpp",
"env": default_env
} }
} }
@ -59,7 +64,7 @@ java_lang_config = {
"run": { "run": {
"command": "/usr/bin/java -cp {exe_dir} -Xss1M -XX:MaxPermSize=16M -XX:PermSize=8M -Xms16M -Xmx{max_memory}k -Djava.security.manager -Djava.security.policy==/etc/java_policy -Djava.awt.headless=true Main", "command": "/usr/bin/java -cp {exe_dir} -Xss1M -XX:MaxPermSize=16M -XX:PermSize=8M -Xms16M -Xmx{max_memory}k -Djava.security.manager -Djava.security.policy==/etc/java_policy -Djava.awt.headless=true Main",
"seccomp_rule": None, "seccomp_rule": None,
"env": ["MALLOC_ARENA_MAX=1"] "env": ["MALLOC_ARENA_MAX=1"] + default_env
} }
} }
@ -76,5 +81,6 @@ py2_lang_config = {
"run": { "run": {
"command": "/usr/bin/python {exe_path}", "command": "/usr/bin/python {exe_path}",
"seccomp_rule": None, "seccomp_rule": None,
"env": default_env
} }
} }