mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
RTF Output: Handle non-breakinf spaces correctly. Fixes #7668 (HTML to RTF (Non Breaking Space) v0.7.29)
This commit is contained in:
parent
31e8fa91b3
commit
730f510e24
@ -81,7 +81,9 @@ def txt2rtf(text):
|
|||||||
buf = cStringIO.StringIO()
|
buf = cStringIO.StringIO()
|
||||||
for x in text:
|
for x in text:
|
||||||
val = ord(x)
|
val = ord(x)
|
||||||
if val <= 127:
|
if val == 160:
|
||||||
|
buf.write('\\~')
|
||||||
|
elif val <= 127:
|
||||||
buf.write(x)
|
buf.write(x)
|
||||||
else:
|
else:
|
||||||
repl = ascii_text(x)
|
repl = ascii_text(x)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user