Update of /cvsroot/mailman/mailman/Mailman/Archiver
In directory sc8-pr-cvs1:/tmp/cvs-serv15089
Modified Files:
Tag: Release_2_1-maint
HyperArch.py
Log Message:
Article.__init__(): Provide a default charset if the message doesn't
have one. Part of TK's patch #865661.
__processbody_URLquote(): One chunk of TK's patch # 865661 for
improving the i18n of the 'at' substitutions for archives.
Index: HyperArch.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Archiver/HyperArch.py,v
retrieving revision 2.37.2.6
retrieving revision 2.37.2.7
diff -u -d -r2.37.2.6 -r2.37.2.7
--- HyperArch.py 24 Dec 2003 17:07:28 -0000 2.37.2.6
+++ HyperArch.py 26 Dec 2003 20:41:30 -0000 2.37.2.7
@@ -287,7 +287,7 @@
self.ctype = ctype.lower()
self.cenc = cenc.lower()
self.decoded = {}
- charset = message.get_param('charset')
+ charset = message.get_param('charset', 'us-ascii')
if isinstance(charset, types.TupleType):
# An RFC 2231 charset
charset = unicode(charset[2], charset[0])
@@ -298,7 +298,7 @@
if charset[0]=="'" and charset[-1]=="'":
charset = charset[1:-1]
try:
- body = message.get_payload(decode=1)
+ body = message.get_payload(decode=True)
except binascii.Error:
body = None
if body and charset != Utils.GetCharSet(self._lang):
@@ -1128,6 +1128,10 @@
# 1. use lines directly, rather than source and dest
# 2. make it clearer
# 3. make it faster
+ # TK: Prepare for unicode obscure.
+ atmark = _(' at ')
+ if lines and isinstance(lines[0], types.UnicodeType):
+ atmark = unicode(atmark, Utils.GetCharSet(self.lang), 'replace')
source = lines[:]
dest = lines
last_line_was_quoted = 0
@@ -1168,7 +1172,7 @@
text = jr.group(1)
length = len(text)
if mm_cfg.ARCHIVER_OBSCURES_EMAILADDRS:
- text = re.sub('@', _(' at '), text)
+ text = re.sub('@', atmark, text)
URL = self.maillist.GetScriptURL(
'listinfo', absolute=1)
else:
_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
Unsubscribe: http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org