Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7797be7

Browse files
committed
Alias iso8859_1 to latin_1 which is the same encoding, but has
a much faster codec implementation.
1 parent 75c9e83 commit 7797be7

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Lib/encodings/aliases.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,11 +393,18 @@
393393
'cskoi8r' : 'koi8_r',
394394

395395
# latin_1 codec
396+
#
397+
# Note that the latin_1 codec is implemented internally in C and a
398+
# lot faster than the charmap codec iso8859_1 which uses the same
399+
# encoding. This is why we discourage the use of the iso8859_1
400+
# codec and alias it to latin_1 instead.
401+
#
396402
'8859' : 'latin_1',
397403
'cp819' : 'latin_1',
398404
'csisolatin1' : 'latin_1',
399405
'ibm819' : 'latin_1',
400406
'iso8859' : 'latin_1',
407+
'iso8859_1' : 'latin_1',
401408
'iso_8859_1' : 'latin_1',
402409
'iso_8859_1_1987' : 'latin_1',
403410
'iso_ir_100' : 'latin_1',

0 commit comments

Comments
 (0)