-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any unicode support? #5
Comments
Is it for Python? If yes, I can help you with that. |
my use case was for Eiffel, but I think the same issue exist for Python on codeboard. |
For Python I used an additional runner where I overrode environment variables and gained unicode support. |
Can you describe a bit more your solution? |
Sorry for my late reply. {
"_comment": "Configuration for this Python3-UnitTest project.",
"MainFileForRunning": "./Root/runner/runner.py",
"DirectoryForSourceFiles": "./Root",
"DirectoryForTestFiles": "./Root/test",
"DirectoryForTestSubmissionFiles": "./Root/submit"
}
And import io
import os
import re
import subprocess
import sys
my_env = os.environ.copy()
my_env["PYTHONIOENCODING"] = "UTF-8"
sys.stdout = io.TextIOWrapper(sys.stdout.detach(), encoding = 'utf-8')
sys.stderr = io.TextIOWrapper(sys.stderr.detach(), encoding = 'utf-8')
sys.stdin = io.TextIOWrapper(sys.stdin.detach(), encoding = 'utf-8')
proc = subprocess.Popen(['python3', './Root/main.py', ''], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=my_env)
output = proc.communicate()[0].decode('UTF-8')
print(output) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems unicode source code is well saved.
But execution of unicode printing does not seems to work fine.
Is there any example of such code?
For instance, output the unicode string "こんにちは!" ?
The text was updated successfully, but these errors were encountered: