Revision: 2574
Author: janne.t.harkonen
Date: Mon Mar 1 03:58:10 2010
Log: Hopefully fixes unicode in Windows with Run
http://code.google.com/p/robotframework/source/detail?r=2574
Modified:
/trunk/src/robot/libraries/OperatingSystem.py
=======================================
--- /trunk/src/robot/libraries/OperatingSystem.py Fri Feb 26 04:45:49 2010
+++ /trunk/src/robot/libraries/OperatingSystem.py Mon Mar 1 03:58:10 2010
@@ -167,7 +167,7 @@
def _run(self, command, mode):
process = os.popen(self._process_command(command))
- stdout = process.read().decode(sys.getfilesystemencoding())
+ stdout = process.read().decode(sys.stdin.encoding)
if stdout.endswith('\n'):
stdout = stdout[:-1]
try:
@@ -204,7 +204,7 @@
else:
command += ' 2>&1'
self._info("Running command '%s'" % command)
- return command.encode(sys.getfilesystemencoding())
+ return command.encode(sys.stdin.encoding)
def start_process(self, command, stdin=None, alias=None):
"""Starts the given command as a background process.