File: 0069-Revert-Automated-conversion-of-format-specifiers.patch

package info (click to toggle)
calibre 8.5.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 431,828 kB
  • sloc: python: 450,752; ansic: 87,218; javascript: 57,667; cpp: 18,719; xml: 1,244; sh: 935; sql: 735; objc: 330; makefile: 68; sed: 3
file content (24 lines) | stat: -rw-r--r-- 918 bytes parent folder | download
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):
         '''