From 2c2a0db24a146dbb3cfeaf3179c32c806c9ece82 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Fri, 26 Aug 2016 10:16:18 +0200 Subject: [PATCH] Update linux.py --- src/fenrir-package/screen/linux.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fenrir-package/screen/linux.py b/src/fenrir-package/screen/linux.py index d5846644..2d2745b1 100644 --- a/src/fenrir-package/screen/linux.py +++ b/src/fenrir-package/screen/linux.py @@ -27,7 +27,7 @@ class screen(): return environment except: return environment - + screenEncoding = environment['runtime']['settingsManager'].getSetting(environment,'screen', 'encoding') # set new "old" values environment['screenData']['oldContentBytes'] = environment['screenData']['newContentBytes'] environment['screenData']['oldContentText'] = environment['screenData']['newContentText'] @@ -48,7 +48,7 @@ class screen(): environment['screenData']['newCursor']['x'] = int( environment['screenData']['newContentBytes'][2]) environment['screenData']['newCursor']['y'] = int( environment['screenData']['newContentBytes'][3]) # analyze content - environment['screenData']['newContentText'] = str(environment['screenData']['newContentBytes'][4:][::2].decode("ascii", "replace")).replace('\n'," ") + environment['screenData']['newContentText'] = environment['screenData']['newContentBytes'][4:][::2].decode(screenEncoding, "replace") environment['screenData']['newContentAttrib'] = environment['screenData']['newContentBytes'][5:][::2] environment['screenData']['newContentText'] = '\n'.join(self.textWrapper.wrap(environment['screenData']['newContentText'], ))[:-2]