--- spambayes-1.0.4/spambayes/ImapUI.py.orig 2005-08-31 19:44:42.000000000 +0900 +++ spambayes-1.0.4/spambayes/ImapUI.py 2006-10-31 20:22:30.000000000 +0900 @@ -48,6 +48,19 @@ import UserInterface from spambayes.Options import options, optionsPathname +# 2005-08-31: updated, by owa. +# support IMAP4rev1 (RFC2060) folder name +def _b2a(s): + s = re.sub(',', '/', s.group(0)) + return unicode('+' + s[5:], 'utf-7') + +def _IMAP4rev1_decode(s): + try: + s = re.sub('&[^-]*-', _b2a, s) + except: + pass + return s + # These are the options that will be offered on the configuration page. # If the option is None, then the entry is a header and the following # options will appear in a new box on the configuration page. @@ -298,7 +311,10 @@ del folderRow.helpCell folderRow.folderBox.name = option folderRow.folderBox.value = folder - folderRow.folderName = folder + # 2005-08-31: updated, by owa. + # support IMAP4rev1 (RFC2060) folder name + #folderRow.folderName = folder + folderRow.folderName = IMAP4rev1_decode(folder) if options.multiple_values_allowed(section, option): if folder in options[section, option]: folderRow.folderBox.checked = "checked"