1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
From: YOKOTA Hiroshi <yokota.hgml@gmail.com>
Date: Tue, 28 Jan 2025 09:37:08 +0200
Subject: Revert "Automated conversion of % format specifiers"
Forwarded: not-needed
This reverts commit e5a65f69ecb0e939a55dfddc727571df899f8d3c.
---
src/calibre/ebooks/unihandecode/unidecoder.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/calibre/ebooks/unihandecode/unidecoder.py b/src/calibre/ebooks/unihandecode/unidecoder.py
index 0bac7ed..aba5069 100644
--- a/src/calibre/ebooks/unihandecode/unidecoder.py
+++ b/src/calibre/ebooks/unihandecode/unidecoder.py
@@ -95,7 +95,7 @@ class Unidecoder:
# Code groups within CODEPOINTS take the form 'xAB'
if not isinstance(character, str):
character = str(character, 'utf-8')
- return f'x{ord(character) >> 8:02x}'
+ return 'x%02x' % (ord(character) >> 8)
def grouped_point(self, character):
'''
|