[Tickets #1621] non-ASCII 7-bit message headers not RFC2047-encoded

bugs at bugs.horde.org bugs at bugs.horde.org
Fri Mar 25 12:26:17 PST 2005


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=1621
-----------------------------------------------------------------------
 Ticket             | 1621
 Updated By         | Michael Slusarz <slusarz at mail.curecanti.org>
 Summary            | non-ASCII 7-bit message headers not RFC2047-encoded
 Queue              | IMP
 Version            | HEAD
 State              | Feedback
 Priority           | 2. Medium
 Type               | Bug
 Owners             | Michael Slusarz
-----------------------------------------------------------------------


Michael Slusarz <slusarz at mail.curecanti.org> (2005-03-25 12:26) wrote:

A couple issues with your patch:
1) We shouldn't be dealing with mb_* functions in MIME - these should be
exclusively in String:: or elsewhere..
2) Any multibyte check should be done in MIME::is8bit() instead of
MIME::encode()
3) The code seems to indicate that any string that is autodetected as not
'ASCII'  needs to be encoded.  However, what if the string is autodetected
as 'UTF-8'?  If the UTF-8 characters are all in the ASCII range, then no
encoding is required.
4) Multibyte characters will *not* be returned as 7-bit ASCII text from the
mb_ereg _*functions.  Since this function is multibyte aware, it will know
to combine consecutive multibyte bytes together to form the character.  I
think the issue is that we are only looking for the 8-bit  characters in the
Regex.  We are not looking for 7-bit characters **or multibyte characters**.
 Therefore, we should probably just change the regex to search for "Not
7-bit ASCII characters" instead of searching for "8-bit characters".

Could you try changing the regex in MIME::is8bit() to "[^\x00-\x7f]" and see
if that fixes things?




More information about the bugs mailing list