Use the same function for getting encoding in Python client and daemon

This commit is contained in:
ZyX 2014-08-27 21:36:19 +04:00
parent 7871cfcda4
commit 484b9af6ed
1 changed files with 4 additions and 1 deletions

View File

@ -7,6 +7,9 @@ import sys
import socket
import errno
import os
from locale import getpreferredencoding
try:
from posix import environ
except ImportError:
@ -49,7 +52,7 @@ except Exception:
args = ['powerline-render'] + sys.argv[1:]
os.execvp('powerline-render', args)
fenc = sys.getfilesystemencoding() or 'utf-8'
fenc = getpreferredencoding() or 'utf-8'
def tobytes(s):