summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--camlui/process.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/camlui/process.py b/camlui/process.py
index 51770be..14f4e0a 100644
--- a/camlui/process.py
+++ b/camlui/process.py
@@ -27,6 +27,7 @@ import subprocess, signal, os
import threading
from re import split
from constants import *
+from decodeh import *
if win32:
import msvcrt, win32pipe, win32api, win32con, time
@@ -223,6 +224,7 @@ toplevels, using normal toplevel")
'''Read data from stdout'''
if data == None:
data = os.read (fd, 8192)
+ data = decode_heuristically (data)[0]
if self.stdout_cb:
self.stdout_cb (data)
self.from_stdout += data
@@ -233,6 +235,7 @@ toplevels, using normal toplevel")
'''Read data to stderr'''
if data == None:
data = os.read (fd, 8192)
+ data = decode_heuristically (data)[0]
if self.stderr_cb:
self.stderr_cb (data)
self.from_stderr += data
@@ -263,6 +266,7 @@ toplevels, using normal toplevel")
else: data += ";;\n"
if self.run_cb:
self.run_cb (" " + data)
+ data = data.encode ("iso-8859-15")
try:
os.write (self.process.stdin.fileno (), data)
except OSError: