From 27580b8cbe3c62f614441c7e24254e5b16648911 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 20 May 2019 15:22:04 +0530 Subject: [PATCH] py3: use unicode literals in rtf2xml --- src/calibre/ebooks/rtf2xml/ParseRtf.py | 1 + src/calibre/ebooks/rtf2xml/__init__.py | 2 +- src/calibre/ebooks/rtf2xml/add_brackets.py | 1 + src/calibre/ebooks/rtf2xml/body_styles.py | 1 + src/calibre/ebooks/rtf2xml/border_parse.py | 1 + src/calibre/ebooks/rtf2xml/char_set.py | 2 +- src/calibre/ebooks/rtf2xml/check_brackets.py | 1 + src/calibre/ebooks/rtf2xml/check_encoding.py | 1 + src/calibre/ebooks/rtf2xml/colors.py | 1 + src/calibre/ebooks/rtf2xml/combine_borders.py | 1 + src/calibre/ebooks/rtf2xml/configure_txt.py | 1 + src/calibre/ebooks/rtf2xml/convert_to_tags.py | 1 + src/calibre/ebooks/rtf2xml/copy.py | 1 + src/calibre/ebooks/rtf2xml/default_encoding.py | 2 +- src/calibre/ebooks/rtf2xml/delete_info.py | 1 + src/calibre/ebooks/rtf2xml/field_strings.py | 1 + src/calibre/ebooks/rtf2xml/fields_large.py | 3 ++- src/calibre/ebooks/rtf2xml/fields_small.py | 1 + src/calibre/ebooks/rtf2xml/fonts.py | 1 + src/calibre/ebooks/rtf2xml/footnote.py | 1 + src/calibre/ebooks/rtf2xml/get_char_map.py | 1 + src/calibre/ebooks/rtf2xml/get_options.py | 1 + src/calibre/ebooks/rtf2xml/group_borders.py | 1 + src/calibre/ebooks/rtf2xml/group_styles.py | 1 + src/calibre/ebooks/rtf2xml/header.py | 1 + src/calibre/ebooks/rtf2xml/headings_to_sections.py | 1 + src/calibre/ebooks/rtf2xml/hex_2_utf8.py | 1 + src/calibre/ebooks/rtf2xml/info.py | 1 + src/calibre/ebooks/rtf2xml/inline.py | 1 + src/calibre/ebooks/rtf2xml/line_endings.py | 1 + src/calibre/ebooks/rtf2xml/list_numbers.py | 1 + src/calibre/ebooks/rtf2xml/list_table.py | 1 + src/calibre/ebooks/rtf2xml/make_lists.py | 1 + src/calibre/ebooks/rtf2xml/old_rtf.py | 1 + src/calibre/ebooks/rtf2xml/options_trem.py | 1 + src/calibre/ebooks/rtf2xml/output.py | 1 + src/calibre/ebooks/rtf2xml/override_table.py | 1 + src/calibre/ebooks/rtf2xml/paragraph_def.py | 1 + src/calibre/ebooks/rtf2xml/paragraphs.py | 1 + src/calibre/ebooks/rtf2xml/pict.py | 1 + src/calibre/ebooks/rtf2xml/preamble_div.py | 1 + src/calibre/ebooks/rtf2xml/preamble_rest.py | 1 + src/calibre/ebooks/rtf2xml/process_tokens.py | 1 + src/calibre/ebooks/rtf2xml/replace_illegals.py | 1 + src/calibre/ebooks/rtf2xml/sections.py | 1 + src/calibre/ebooks/rtf2xml/styles.py | 1 + src/calibre/ebooks/rtf2xml/table.py | 1 + src/calibre/ebooks/rtf2xml/table_info.py | 1 + src/calibre/ebooks/rtf2xml/tokenize.py | 3 ++- 49 files changed, 51 insertions(+), 5 deletions(-) diff --git a/src/calibre/ebooks/rtf2xml/ParseRtf.py b/src/calibre/ebooks/rtf2xml/ParseRtf.py index 5fc57c98f6..e38f640a5d 100755 --- a/src/calibre/ebooks/rtf2xml/ParseRtf.py +++ b/src/calibre/ebooks/rtf2xml/ParseRtf.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/__init__.py b/src/calibre/ebooks/rtf2xml/__init__.py index 5200b54694..a106fe9eca 100755 --- a/src/calibre/ebooks/rtf2xml/__init__.py +++ b/src/calibre/ebooks/rtf2xml/__init__.py @@ -1,4 +1,4 @@ -from __future__ import unicode_literals +from __future__ import unicode_literals, absolute_import, print_function, division import io diff --git a/src/calibre/ebooks/rtf2xml/add_brackets.py b/src/calibre/ebooks/rtf2xml/add_brackets.py index 71b08b5bb5..3f991d5e34 100755 --- a/src/calibre/ebooks/rtf2xml/add_brackets.py +++ b/src/calibre/ebooks/rtf2xml/add_brackets.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/body_styles.py b/src/calibre/ebooks/rtf2xml/body_styles.py index 1876264971..ec78443a75 100755 --- a/src/calibre/ebooks/rtf2xml/body_styles.py +++ b/src/calibre/ebooks/rtf2xml/body_styles.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/border_parse.py b/src/calibre/ebooks/rtf2xml/border_parse.py index 29852eeba1..782b0b8cbb 100755 --- a/src/calibre/ebooks/rtf2xml/border_parse.py +++ b/src/calibre/ebooks/rtf2xml/border_parse.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/char_set.py b/src/calibre/ebooks/rtf2xml/char_set.py index 31e5e66bbe..5ad6950856 100755 --- a/src/calibre/ebooks/rtf2xml/char_set.py +++ b/src/calibre/ebooks/rtf2xml/char_set.py @@ -1,4 +1,4 @@ -from __future__ import unicode_literals +from __future__ import unicode_literals, absolute_import, print_function, division char_set = """ NON-BREAKING HYPEHN:_:8290:‑ diff --git a/src/calibre/ebooks/rtf2xml/check_brackets.py b/src/calibre/ebooks/rtf2xml/check_brackets.py index 355af163b4..c3ebfcde32 100755 --- a/src/calibre/ebooks/rtf2xml/check_brackets.py +++ b/src/calibre/ebooks/rtf2xml/check_brackets.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/check_encoding.py b/src/calibre/ebooks/rtf2xml/check_encoding.py index fa8f7075aa..a35a9a021f 100755 --- a/src/calibre/ebooks/rtf2xml/check_encoding.py +++ b/src/calibre/ebooks/rtf2xml/check_encoding.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division #!/usr/bin/env python2 import sys diff --git a/src/calibre/ebooks/rtf2xml/colors.py b/src/calibre/ebooks/rtf2xml/colors.py index 1dbd804965..7530e7bd0c 100755 --- a/src/calibre/ebooks/rtf2xml/colors.py +++ b/src/calibre/ebooks/rtf2xml/colors.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/combine_borders.py b/src/calibre/ebooks/rtf2xml/combine_borders.py index eb5c83890c..547f7d709f 100755 --- a/src/calibre/ebooks/rtf2xml/combine_borders.py +++ b/src/calibre/ebooks/rtf2xml/combine_borders.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/configure_txt.py b/src/calibre/ebooks/rtf2xml/configure_txt.py index e4904b851d..2ce8f94a77 100755 --- a/src/calibre/ebooks/rtf2xml/configure_txt.py +++ b/src/calibre/ebooks/rtf2xml/configure_txt.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division import os, sys from . import open_for_read diff --git a/src/calibre/ebooks/rtf2xml/convert_to_tags.py b/src/calibre/ebooks/rtf2xml/convert_to_tags.py index 2c077b021b..5ea516bb6b 100755 --- a/src/calibre/ebooks/rtf2xml/convert_to_tags.py +++ b/src/calibre/ebooks/rtf2xml/convert_to_tags.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division import os, sys from codecs import EncodedFile diff --git a/src/calibre/ebooks/rtf2xml/copy.py b/src/calibre/ebooks/rtf2xml/copy.py index e89d24c002..f81cc505b3 100755 --- a/src/calibre/ebooks/rtf2xml/copy.py +++ b/src/calibre/ebooks/rtf2xml/copy.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/default_encoding.py b/src/calibre/ebooks/rtf2xml/default_encoding.py index 40feb8f0bd..a1b701953c 100755 --- a/src/calibre/ebooks/rtf2xml/default_encoding.py +++ b/src/calibre/ebooks/rtf2xml/default_encoding.py @@ -1,4 +1,4 @@ -from __future__ import print_function +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # copyright 2002 Paul Henry Tremblay # diff --git a/src/calibre/ebooks/rtf2xml/delete_info.py b/src/calibre/ebooks/rtf2xml/delete_info.py index 134bfb7943..fe92139156 100755 --- a/src/calibre/ebooks/rtf2xml/delete_info.py +++ b/src/calibre/ebooks/rtf2xml/delete_info.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/field_strings.py b/src/calibre/ebooks/rtf2xml/field_strings.py index 522dabef29..a43f4a6992 100755 --- a/src/calibre/ebooks/rtf2xml/field_strings.py +++ b/src/calibre/ebooks/rtf2xml/field_strings.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/fields_large.py b/src/calibre/ebooks/rtf2xml/fields_large.py index 04598c7fc0..6216217a15 100755 --- a/src/calibre/ebooks/rtf2xml/fields_large.py +++ b/src/calibre/ebooks/rtf2xml/fields_large.py @@ -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: diff --git a/src/calibre/ebooks/rtf2xml/fields_small.py b/src/calibre/ebooks/rtf2xml/fields_small.py index ca210e4466..d9ac4b78cb 100755 --- a/src/calibre/ebooks/rtf2xml/fields_small.py +++ b/src/calibre/ebooks/rtf2xml/fields_small.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/fonts.py b/src/calibre/ebooks/rtf2xml/fonts.py index 54ab352efa..20c6151d2c 100755 --- a/src/calibre/ebooks/rtf2xml/fonts.py +++ b/src/calibre/ebooks/rtf2xml/fonts.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/footnote.py b/src/calibre/ebooks/rtf2xml/footnote.py index 7c5893b106..007febb775 100755 --- a/src/calibre/ebooks/rtf2xml/footnote.py +++ b/src/calibre/ebooks/rtf2xml/footnote.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/get_char_map.py b/src/calibre/ebooks/rtf2xml/get_char_map.py index 4ce42e37c8..9b6734761c 100755 --- a/src/calibre/ebooks/rtf2xml/get_char_map.py +++ b/src/calibre/ebooks/rtf2xml/get_char_map.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/get_options.py b/src/calibre/ebooks/rtf2xml/get_options.py index fcffff7fcd..c99a0d86ed 100755 --- a/src/calibre/ebooks/rtf2xml/get_options.py +++ b/src/calibre/ebooks/rtf2xml/get_options.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/group_borders.py b/src/calibre/ebooks/rtf2xml/group_borders.py index 36118e1247..bc34c99a32 100755 --- a/src/calibre/ebooks/rtf2xml/group_borders.py +++ b/src/calibre/ebooks/rtf2xml/group_borders.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/group_styles.py b/src/calibre/ebooks/rtf2xml/group_styles.py index cd040ebc1f..e0c0b4444f 100755 --- a/src/calibre/ebooks/rtf2xml/group_styles.py +++ b/src/calibre/ebooks/rtf2xml/group_styles.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/header.py b/src/calibre/ebooks/rtf2xml/header.py index 1d6e3261dd..05a4783172 100755 --- a/src/calibre/ebooks/rtf2xml/header.py +++ b/src/calibre/ebooks/rtf2xml/header.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/headings_to_sections.py b/src/calibre/ebooks/rtf2xml/headings_to_sections.py index 959802de38..f9bc59ba3c 100755 --- a/src/calibre/ebooks/rtf2xml/headings_to_sections.py +++ b/src/calibre/ebooks/rtf2xml/headings_to_sections.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/hex_2_utf8.py b/src/calibre/ebooks/rtf2xml/hex_2_utf8.py index 6a9ca1af48..3dbd47acba 100755 --- a/src/calibre/ebooks/rtf2xml/hex_2_utf8.py +++ b/src/calibre/ebooks/rtf2xml/hex_2_utf8.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/info.py b/src/calibre/ebooks/rtf2xml/info.py index f3b1a73b62..37a1bf7c65 100755 --- a/src/calibre/ebooks/rtf2xml/info.py +++ b/src/calibre/ebooks/rtf2xml/info.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/inline.py b/src/calibre/ebooks/rtf2xml/inline.py index b10cf4ac20..301c7eae4d 100755 --- a/src/calibre/ebooks/rtf2xml/inline.py +++ b/src/calibre/ebooks/rtf2xml/inline.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division import sys, os from calibre.ebooks.rtf2xml import copy diff --git a/src/calibre/ebooks/rtf2xml/line_endings.py b/src/calibre/ebooks/rtf2xml/line_endings.py index 5dbc59a995..4660097c6e 100755 --- a/src/calibre/ebooks/rtf2xml/line_endings.py +++ b/src/calibre/ebooks/rtf2xml/line_endings.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/list_numbers.py b/src/calibre/ebooks/rtf2xml/list_numbers.py index 6da6a34b8d..7e074f107e 100755 --- a/src/calibre/ebooks/rtf2xml/list_numbers.py +++ b/src/calibre/ebooks/rtf2xml/list_numbers.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/list_table.py b/src/calibre/ebooks/rtf2xml/list_table.py index 183b31b6ea..d85b7232b4 100755 --- a/src/calibre/ebooks/rtf2xml/list_table.py +++ b/src/calibre/ebooks/rtf2xml/list_table.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division from __future__ import print_function ######################################################################### # # diff --git a/src/calibre/ebooks/rtf2xml/make_lists.py b/src/calibre/ebooks/rtf2xml/make_lists.py index baacccdf73..4cea5b1b13 100755 --- a/src/calibre/ebooks/rtf2xml/make_lists.py +++ b/src/calibre/ebooks/rtf2xml/make_lists.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/old_rtf.py b/src/calibre/ebooks/rtf2xml/old_rtf.py index 9ff770e70f..aec7604661 100755 --- a/src/calibre/ebooks/rtf2xml/old_rtf.py +++ b/src/calibre/ebooks/rtf2xml/old_rtf.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/options_trem.py b/src/calibre/ebooks/rtf2xml/options_trem.py index ff6ba5194f..d8fdf7d3dd 100755 --- a/src/calibre/ebooks/rtf2xml/options_trem.py +++ b/src/calibre/ebooks/rtf2xml/options_trem.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division from __future__ import print_function import sys diff --git a/src/calibre/ebooks/rtf2xml/output.py b/src/calibre/ebooks/rtf2xml/output.py index d84f80498d..7e653fee1a 100755 --- a/src/calibre/ebooks/rtf2xml/output.py +++ b/src/calibre/ebooks/rtf2xml/output.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/override_table.py b/src/calibre/ebooks/rtf2xml/override_table.py index 5477f289f3..3ae53097c9 100755 --- a/src/calibre/ebooks/rtf2xml/override_table.py +++ b/src/calibre/ebooks/rtf2xml/override_table.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division from __future__ import print_function ######################################################################### # # diff --git a/src/calibre/ebooks/rtf2xml/paragraph_def.py b/src/calibre/ebooks/rtf2xml/paragraph_def.py index 08412daa67..45c2f136ec 100755 --- a/src/calibre/ebooks/rtf2xml/paragraph_def.py +++ b/src/calibre/ebooks/rtf2xml/paragraph_def.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/paragraphs.py b/src/calibre/ebooks/rtf2xml/paragraphs.py index 425fd89312..5962c9298d 100755 --- a/src/calibre/ebooks/rtf2xml/paragraphs.py +++ b/src/calibre/ebooks/rtf2xml/paragraphs.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/pict.py b/src/calibre/ebooks/rtf2xml/pict.py index 6487c0214e..62fa905db5 100755 --- a/src/calibre/ebooks/rtf2xml/pict.py +++ b/src/calibre/ebooks/rtf2xml/pict.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/preamble_div.py b/src/calibre/ebooks/rtf2xml/preamble_div.py index e0895b7722..cd7bcbef0a 100755 --- a/src/calibre/ebooks/rtf2xml/preamble_div.py +++ b/src/calibre/ebooks/rtf2xml/preamble_div.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division from __future__ import print_function ######################################################################### # # diff --git a/src/calibre/ebooks/rtf2xml/preamble_rest.py b/src/calibre/ebooks/rtf2xml/preamble_rest.py index 1a7a386c46..9a828799a7 100755 --- a/src/calibre/ebooks/rtf2xml/preamble_rest.py +++ b/src/calibre/ebooks/rtf2xml/preamble_rest.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/process_tokens.py b/src/calibre/ebooks/rtf2xml/process_tokens.py index f866984c05..c7a720f152 100755 --- a/src/calibre/ebooks/rtf2xml/process_tokens.py +++ b/src/calibre/ebooks/rtf2xml/process_tokens.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/replace_illegals.py b/src/calibre/ebooks/rtf2xml/replace_illegals.py index 7b811fce95..38616c0c8c 100755 --- a/src/calibre/ebooks/rtf2xml/replace_illegals.py +++ b/src/calibre/ebooks/rtf2xml/replace_illegals.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/sections.py b/src/calibre/ebooks/rtf2xml/sections.py index 5d1a811b86..3fbd7b3187 100755 --- a/src/calibre/ebooks/rtf2xml/sections.py +++ b/src/calibre/ebooks/rtf2xml/sections.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/styles.py b/src/calibre/ebooks/rtf2xml/styles.py index 069ce3f983..d86e26782f 100755 --- a/src/calibre/ebooks/rtf2xml/styles.py +++ b/src/calibre/ebooks/rtf2xml/styles.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/table.py b/src/calibre/ebooks/rtf2xml/table.py index 927c6b48b8..4424a4978a 100755 --- a/src/calibre/ebooks/rtf2xml/table.py +++ b/src/calibre/ebooks/rtf2xml/table.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/table_info.py b/src/calibre/ebooks/rtf2xml/table_info.py index 47332a747b..cb4bc5e64f 100755 --- a/src/calibre/ebooks/rtf2xml/table_info.py +++ b/src/calibre/ebooks/rtf2xml/table_info.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, absolute_import, print_function, division ######################################################################### # # # # diff --git a/src/calibre/ebooks/rtf2xml/tokenize.py b/src/calibre/ebooks/rtf2xml/tokenize.py index 77ab553a84..4247299b41 100755 --- a/src/calibre/ebooks/rtf2xml/tokenize.py +++ b/src/calibre/ebooks/rtf2xml/tokenize.py @@ -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