py3: use unicode literals in rtf2xml

This commit is contained in:
Kovid Goyal 2019-05-20 15:22:04 +05:30
parent 6e157be8fa
commit 27580b8cbe
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
49 changed files with 51 additions and 5 deletions

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,4 +1,4 @@
from __future__ import unicode_literals
from __future__ import unicode_literals, absolute_import, print_function, division
import io

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,4 +1,4 @@
from __future__ import unicode_literals
from __future__ import unicode_literals, absolute_import, print_function, division
char_set = """
<ms_standard>
NON-BREAKING HYPEHN:_:8290:&#x2011;

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#!/usr/bin/env python2
import sys

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
import os, sys
from . import open_for_read

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
import os, sys
from codecs import EncodedFile

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,4 +1,4 @@
from __future__ import print_function
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# copyright 2002 Paul Henry Tremblay #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #
@ -70,7 +71,7 @@ Examples
\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
\f4\lang1033\cgrid }}\pard\plain
\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
\f4\lang1033\cgrid {\fs28 \u214\'85 \par }{\fs36 {\field{\*\fldinst
\f4\lang1033\cgrid {\fs28 \\u214\'85 \par }{\fs36 {\field{\*\fldinst
SYMBOL 67 \\f "Symbol" \\s 18}{\fldrslt\f3\fs36}}}
Becomes:
<field-block type="table-of-contents">

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
import sys, os
from calibre.ebooks.rtf2xml import copy

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
from __future__ import print_function
#########################################################################
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
from __future__ import print_function
import sys

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
from __future__ import print_function
#########################################################################
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
from __future__ import print_function
#########################################################################
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals, absolute_import, print_function, division
#########################################################################
# #
# #
@ -66,7 +67,7 @@ class Tokenize:
self.__reini_utf8_counters()
return token
# add a uc control
elif token[:3] == r'\uc':
elif token[:3] == '\\uc':
self.__uc_value[-1] = int(token[3:])
self.__reini_utf8_counters()
return token