diff --git a/test/crossrunner/report.py b/test/crossrunner/report.py
index a284d2b..6ffc8e2 100644
--- a/test/crossrunner/report.py
+++ b/test/crossrunner/report.py
@@ -84,7 +84,7 @@
   @classmethod
   def test_logfile(cls, test_name, prog_kind, dir=None):
     relpath = os.path.join('log', '%s_%s.log' % (test_name, prog_kind))
-    return relpath if not dir else os.path.realpath(os.path.join(dir, relpath))
+    return relpath if not dir else os.path.realpath(os.path.join(dir.decode(sys.getfilesystemencoding()), relpath.decode(sys.getfilesystemencoding())).encode(sys.getfilesystemencoding()))	
 
   def _start(self):
     self._start_time = time.time()
@@ -194,8 +194,13 @@
     self.out.close()
 
   def _print_header(self):
+    tmp = list()
+    joined = ''
+    for item in self._prog.command:
+      tmp.append( item.decode(sys.getfilesystemencoding()))
+    joined = ' '.join(tmp).encode(sys.getfilesystemencoding())    
     self._print_date()
-    self.out.write('Executing: %s\n' % ' '.join(self._prog.command))
+    self.out.write('Executing: %s\n' % joined)
     self.out.write('Directory: %s\n' % self._prog.workdir)
     self.out.write('config:delay: %s\n' % self._test.delay)
     self.out.write('config:timeout: %s\n' % self._test.timeout)
diff --git a/test/crossrunner/run.py b/test/crossrunner/run.py
index ae7d366..8de6ba9 100644
--- a/test/crossrunner/run.py
+++ b/test/crossrunner/run.py
@@ -21,6 +21,7 @@
 import multiprocessing
 import multiprocessing.managers
 import os
+import sys
 import platform
 import random
 import socket
@@ -81,11 +82,16 @@
     return args
 
   def start(self, timeout=0):
-    self._log.debug('COMMAND: %s', ' '.join(self.cmd))
+    tmp = list()
+    joined = ''
+    for item in self.cmd:
+      tmp.append( item.decode(sys.getfilesystemencoding()))
+    joined = ' '.join(tmp).encode(sys.getfilesystemencoding())    
+    self._log.debug('COMMAND: %s', joined)
     self._log.debug('WORKDIR: %s', self.cwd)
     self._log.debug('LOGFILE: %s', self.report.logpath)
     self.report.begin()
-    self.proc = subprocess.Popen(self.cmd, **self._popen_args())
+    self.proc = subprocess.Popen(tmp, **self._popen_args())
     if timeout > 0:
       self.timer = threading.Timer(timeout, self._expire)
       self.timer.start()
diff --git a/test/crossrunner/test.py b/test/crossrunner/test.py
index 3750ba3..6a30b3e 100644
--- a/test/crossrunner/test.py
+++ b/test/crossrunner/test.py
@@ -51,7 +51,9 @@
   def _fix_cmd_path(self, cmd):
     # if the arg is a file in the current directory, make it path
     def abs_if_exists(arg):
-      p = os.path.join(self.workdir, arg)
+      p = self.workdir.decode(sys.getfilesystemencoding())
+      p = os.path.join(p, arg.decode(sys.getfilesystemencoding()))
+      p = p.encode(sys.getfilesystemencoding())
       return p if os.path.exists(p) else arg
 
     if cmd[0] == 'python':
@@ -113,7 +115,11 @@
     if os.path.isabs(path):
       path = os.path.realpath(path)
     else:
-      path = os.path.realpath(os.path.join(self.testdir, path))
+      tmp  = self.testdir.decode(sys.getfilesystemencoding())
+      path = path.decode(sys.getfilesystemencoding())
+      path = os.path.join(tmp, path)
+      path = path.encode(sys.getfilesystemencoding())
+      path = os.path.realpath(path)
     config.update({key: path})
     return config
 
