diff options
| author | bwarsaw | 2002-04-10 04:35:29 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-04-10 04:35:29 +0000 |
| commit | 256b627da62e1de10292e15f3b45facd56a460a4 (patch) | |
| tree | 7e8a8713b310cc7ce52d3288c058427b065ecfa8 | |
| parent | bb331ca960bfb41f9233b1197d5210a702782435 (diff) | |
| download | mailman-256b627da62e1de10292e15f3b45facd56a460a4.tar.gz mailman-256b627da62e1de10292e15f3b45facd56a460a4.tar.zst mailman-256b627da62e1de10292e15f3b45facd56a460a4.zip | |
Add some Japanese encoding aliases as recommended by Martin von
Loewis. This is necessary because the Japanese codecs are provided by
third parties, and don't integrate themselves correctly in earlier
Pythons.
| -rw-r--r-- | Mailman/Defaults.py.in | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Mailman/Defaults.py.in b/Mailman/Defaults.py.in index 0f8a0bc00..e20ef3806 100644 --- a/Mailman/Defaults.py.in +++ b/Mailman/Defaults.py.in @@ -1120,3 +1120,18 @@ add_language('no', _('Norwegian'), 'iso-8859-1') add_language('ru', _('Russian'), 'koi8-r') del _ + + +# Because the Japanese codecs are currently provided by a 3rd party package, +# Pythons previous to 2.3 don't know about Japanese codec aliases. Martin von +# Loewis says these need to be added before any of the codecs are accessed. +import encodings.aliases + +ja_aliases = {'euc_jp':'japanese.euc_jp', + 'shift_jis':'japanese.shift_jis', + 'windows-932':'japanese.ms932', + 'cp932':'japanese.ms932', + 'ms932':'japanese.ms932', + 'iso_2022_jp':'japanese.iso_2022_jp', + } +encodings.aliases.aliases.update(ja_aliases) |
