
Untitled
By: a guest on
Sep 11th, 2012 | syntax:
None | size: 0.85 KB | hits: 7 | expires: Never
diff --git src/python-sitelib/sitepyxpcom.py src/python-sitelib/sitepyxpcom.py
index 994b60d..5a8f6f6 100644
--- src/python-sitelib/sitepyxpcom.py
+++ src/python-sitelib/sitepyxpcom.py
@@ -18,7 +18,7 @@ output is written to the console.
import os
import sys
-
+import codecs
def redirect_std_handles():
stdout_log_name = "pystdout.log"
@@ -43,8 +43,8 @@ def redirect_std_handles():
if log_dir is not None:
stdout_log_path = os.path.join(log_dir, stdout_log_name)
stderr_log_path = os.path.join(log_dir, stderr_log_name)
- sys.stdout = open(stdout_log_path, "w")
- sys.stderr = open(stderr_log_path, "w")
+ sys.stdout = codecs.open(stdout_log_path, "w", "UTF-8")
+ sys.stderr = codecs.open(stderr_log_path, "w", "UTF-8")
else:
# Fallback to "writing" to /dev/null.
class NullWriter: