[Python-Dev] New codecs checked in

"Martin v. Löwis" martin at v.loewis.de
Sun Oct 23 15:53:04 CEST 2005


M.-A. Lemburg wrote:
> I've checked in a whole bunch of newly generated codecs
> which now make use of the faster charmap decoding variant added
> by Walter a short while ago.
> 
> Please let me know if you find any problems.

I think we should work on eliminating the decoding_map variables.
There are some codecs which rely on them being present in other codecs
(e.g. koi8_u.py is based on koi8_r.py); however, this could be updated
to use, say

decoding_table = codecs.update_decoding_map(koi8_r.decoding_table, {
         0x00a4: 0x0454, #       CYRILLIC SMALL LETTER UKRAINIAN IE
         0x00a6: 0x0456, #       CYRILLIC SMALL LETTER 
BYELORUSSIAN-UKRAINIAN I
         0x00a7: 0x0457, #       CYRILLIC SMALL LETTER YI (UKRAINIAN)
         0x00ad: 0x0491, #       CYRILLIC SMALL LETTER UKRAINIAN GHE 
WITH UPTURN
         0x00b4: 0x0404, #       CYRILLIC CAPITAL LETTER UKRAINIAN IE
         0x00b6: 0x0406, #       CYRILLIC CAPITAL LETTER 
BYELORUSSIAN-UKRAINIAN I
         0x00b7: 0x0407, #       CYRILLIC CAPITAL LETTER YI (UKRAINIAN)
         0x00bd: 0x0490, #       CYRILLIC CAPITAL LETTER UKRAINIAN GHE 
WITH UPTURN
})

With all these cross-references gone, the decoding_maps could also go.

Regards,
Martin


More information about the Python-Dev mailing list