Hi! I tried to make pipermail (read: HyperArch.pl) aware of german Umlauts. They're normally MIME-Encoded, using iso-8859-1. I searched through the existing code for "<" and ">" substitution as they're correctly substituted by < and >. Then I worked out the patch below. Unfortunately, "<" and ">" are working as before, but the other substitutions are never executed:-( Could anybody please give me some hints? MfG, JBG diff -Nru mailman-2.0.6/Mailman/Archiver/HyperArch.py mailman-2.0.6-jbglaw/Mailman/Archiver/HyperArch.py --- mailman-2.0.6/Mailman/Archiver/HyperArch.py Mon Nov 13 22:50:05 2000 +++ mailman-2.0.6-jbglaw/Mailman/Archiver/HyperArch.py Mon Oct 1 16:24:38 2001 @@ -57,10 +57,28 @@ def html_quote(s): - repls = ( ('&', '&'), - ("<", '<'), - (">", '>'), - ('"', '"')) + repls = ( ( '&', '&' ), + ( '<', '<' ), + ( '>', '>' ), + ( '=20', ' ' ), + ( '=3D', '=' ), + ( '=E4', 'ä' ), + ( '=F6', 'ö' ), + ( '=FC', 'ü' ), + ( '=DF', 'ß' ), + ( '=C4', 'Ä' ), + ( '=F6', 'Ö' ), + ( '=DC', 'Ü' ), + ( '=E9', 'é' ), + ( 'ä', 'ä' ), + ( 'ö', 'ö' ), + ( 'ü', 'ü' ), + ( 'ß', 'ß' ), + ( 'Ä', 'Ä' ), + ( 'Ö', 'Ö' ), + ( 'Ü', 'Ü' ), + ( 'é', 'é' ), + ( '"', '"' )) for thing, repl in repls: s = string.replace(s, thing, repl) return s -- Jan-Benedict Glaw . jbglaw@lug-owl.de . +49-172-7608481
"JG" == Jan-Benedict Glaw <jbglaw@lug-owl.de> writes:
JG> I tried to make pipermail (read: HyperArch.pl) aware of german ---------------------------------------------------^^ <shudder> :) JG> Umlauts. They're normally MIME-Encoded, using iso-8859-1. I JG> searched through the existing code for "<" and ">" JG> substitution as they're correctly substituted by < and JG> >. Then I worked out the patch below. JG> Unfortunately, "<" and ">" are working as before, but the JG> other substitutions are never executed:-( Could anybody please JG> give me some hints? The most bogus part of the Pipermail integration is that lots of stuff is duplicated not by inheritance, but by cut-and-paste. That means even though you think you're changing something, it's really just overridden in one of the derived classes. This all needs to be cleaned up. :( -Barry
participants (2)
-
barry@zope.com
-
Jan-Benedict Glaw