mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix command line output on linux systems with incorrect LANG/LC_TYPE env vars. See #1085103
This commit is contained in:
parent
629277a2f4
commit
5b3dfa2595
@ -146,7 +146,7 @@ class ANSIStream(Detect):
|
||||
|
||||
def __init__(self, stream=None):
|
||||
super(ANSIStream, self).__init__(stream)
|
||||
self.encoding = getattr(self.stream, 'encoding', 'utf-8')
|
||||
self.encoding = getattr(self.stream, 'encoding', 'utf-8') or 'utf-8'
|
||||
|
||||
def write(self, text):
|
||||
if isinstance(text, type(u'')):
|
||||
|
Loading…
x
Reference in New Issue
Block a user