Merge branch '0.10' into 0.11

pull/2180/head
sebres 6 years ago
commit 4c18a04439

@ -32,11 +32,10 @@ from threading import Lock
from .server.mytime import MyTime from .server.mytime import MyTime
PREFER_ENC = locale.getpreferredencoding() PREFER_ENC = locale.getpreferredencoding()
# correct preferred encoding if lang not set in environment: # correct preferred encoding if lang not set in environment:
if PREFER_ENC.startswith('ANSI_'): # pragma: no cover if PREFER_ENC.startswith('ANSI_'): # pragma: no cover
if sys.stdout and not sys.stdout.encoding.startswith('ANSI_'): if sys.stdout and sys.stdout.encoding is not None and not sys.stdout.encoding.startswith('ANSI_'):
PREFER_ENC = sys.stdout.encoding PREFER_ENC = sys.stdout.encoding
elif all((os.getenv(v) in (None, "") for v in ('LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LANG'))): elif all((os.getenv(v) in (None, "") for v in ('LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LANG'))):
PREFER_ENC = 'UTF-8'; PREFER_ENC = 'UTF-8';

Loading…
Cancel
Save