mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Normalize the encoding names for Latin-1 and UTF-8 to
'latin-1' and 'utf-8'. These are optimized in the Python Unicode implementation to result in more direct processing, bypassing the codec registry. Also see issue11303.
This commit is contained in:
parent
a391b11320
commit
8f36af7a4c
32 changed files with 84 additions and 79 deletions
|
|
@ -85,7 +85,7 @@ def __init__(self, _val):
|
|||
if isinstance(_val, bytes):
|
||||
# sqlite3 always calls __init__ with a bytes created from a
|
||||
# UTF-8 string when __conform__ was used to store the object.
|
||||
_val = _val.decode('utf8')
|
||||
_val = _val.decode('utf-8')
|
||||
self.val = _val
|
||||
|
||||
def __cmp__(self, other):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue