mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-21 09:03:25 +02:00
...
This commit is contained in:
parent
7bf24395a8
commit
e9c8ffe5e9
1 changed files with 2 additions and 0 deletions
|
|
@ -146,6 +146,8 @@ def write_unicode_text(self, text, ignore_errors=False):
|
|||
while text:
|
||||
t, text = text[:chunk], text[chunk:]
|
||||
wt = c_wchar_p(t)
|
||||
# Use the fact that len(t) == wcslen(wt) in python 2.7 on
|
||||
# windows where the python unicode type uses UTF-16
|
||||
if not self.write_console(self.file_handle, wt, len(t), byref(written), None):
|
||||
# Older versions of windows can fail to write large strings
|
||||
# to console with WriteConsoleW (seen it happen on Win XP)
|
||||
|
|
|
|||
Loading…
Reference in a new issue