[Mailman-Users] Problem archiving Japanese messages

Akira Tagata tagata at rand.co.jp
Thu Jun 1 10:55:08 CEST 2000


I have just rewritten the process:

| $ diff Mailman/Archiver/Archiver.py Mailman/Archiver/Archiver.py.20000531 
| 233,244d232
| < 		    ########## nkf before internal archiver ##########
| < 		    import tempfile
| < 		    outputfile=tempfile.mktemp()
| < 		    filter = '/usr/bin/nkf -me >' + outputfile
| < 		    tofilter=os.popen(filter, 'w')
| < 		    tofilter.write(txt)
| < 		    tofilter.close()
| < 		    fromfilter=open(outputfile)
| < 		    txt=fromfilter.read()
| < 		    fromfilter.close()
| < 		    os.remove(outputfile)
| < 		    ########## nkf before internal archiver ##########

The original code (Archiver.py.20000531) is from Mailman v1.1 on the
Debian GNU/Linux 2.1 distribution.

This is so ugly....

[snip]

> > I have modified Archiver.py to invoke nkf from Mailman before the internal
> > archiver process as follows.  Your hint was so valuable.
> > 
> > 
> > | $ diff Mailman/Archiver/Archiver.py Mailman/Archiver/Archiver.py.20000531 
> > | 233,241d232
> > | < 		    ########## nkf before internal archiver ##########
> > | < 		    import popen2
> > | < 		    (nkfout, nkfin) = popen2.popen2('/usr/bin/nkf -me')
> > | < 		    nkfin.write(txt)
> > | < 		    nkfin.close()
> > | < 		    tmptxt = nkfout.read()
> > | < 		    nkfout.close()
> > | < 		    txt = tmptxt
> > | < 		    ########## nkf before internal archiver ##########

[snip]

> A large text process was blocked.

[snip]



-- 
Akira Tagata <tagata at rand.co.jp>
R&D Computer Co., Ltd. / Tokyo




More information about the Mailman-Users mailing list