
[A discussion about replacing JapaneseCodecs and KoreanCodecs in Mailman 2.1.4 with CJKCodecs] On Mon, 2003-12-29 at 03:26, Tokio Kikuchi wrote:
Sorry again Barry.
We have to keep JapaneseCodecs and KoreanCodecs in the ditribution and install in the pythonlib directory because email package designate japanese and korean as prefix of charsets. I will have to study more on cjkcodecs behavior (looks like japanese part has old bug in earlier distribution of JapaneseCodecs) so please cancel this checkin.
Oh dang. The problem is CODEC_MAP in email/Charset.py, right? Here's a hack for Mailman 2.1.4: -----japanese.py from cjkcodecs import euc-jp, iso-2022-jp, shift_jis -----korean.py from cjkcodecs import euc-kr, cp949, iso-2022-kr, johab We add these two files to Mailman's pythonlib, and then the imports in Charset.py should work correctly. It would be nice if cjkcodecs provided backwards compatibility. Otherwise, we probably want to provide some ourselves in email/Charset.py. I'm not sure there's a better way to do this, but attached is a strawman (untested) patch for email 2.5.5/Python 2.3.4. It's too late to get this into Python 2.3.3, but if this is acceptable, I can check this in for Python 2.3.4, and cut a new email package tarball for Mailman 2.1.4, forgoing the above hack. -Barry