Do not replace ascii with UTF-8 in powerline-daemon and python client

Assuming ascii was expected to be used when LANG=C it did not work in any case:
in this case preferred encoding is “ANSI_X3.4-1968”. Same for
`sys.getfilesystemencoding()`.
This commit is contained in:
ZyX 2014-08-27 21:30:02 +04:00
parent dc1d50bc8f
commit 70e7088b04
2 changed files with 0 additions and 4 deletions

View File

@ -45,8 +45,6 @@ except Exception:
os.execvp('powerline-render', args)
fenc = sys.getfilesystemencoding() or 'utf-8'
if fenc == 'ascii':
fenc = 'utf-8'
tobytes = lambda s: s if isinstance(s, bytes) else s.encode(fenc)

View File

@ -143,8 +143,6 @@ def do_write(conn, result):
encoding = getpreferredencoding() or 'UTF-8'
if encoding.lower() == 'ascii':
encoding = 'UTF-8'
def safe_bytes(o, encoding=encoding):