[wp-hackers] 8bit ASCII characters in mail-headers

Sebastian Herp newsletter at scytheman.net
Wed Sep 8 12:25:20 UTC 2004


Hello again,

i played around with the comment notification function and as drDave 
suspected, wordpress doesn't respect RFCs :-)

So I wrote a little function that converts Subject and From headers 
correctly into the "Q" encoding described in RFC1522 
(http://rfc.net/rfc1522.html). I have tested it with Wordpress 1.2 and 
it works perfectly :-) Every ÖÄÜß is encoded ... hurray!!!! Is there a 
large enough interest from the developer-side to implement this in 
wordpress (had a bad expierience with the wp-calendar which _still_ does 
not know that there are nations not using sunday as the first day of the 
week)? If yes, i'll get it to work with the CVS version and post the 
diffs ...

Greetings,
Sebastian

P.S.: It was my MUA (Cyrus) who messed up everything (it has an option 
to not allow 8bit chars in headers) :-) ... and just because every ISP 
in the world allows 8bit chars in headers we SHOULD nevertheless encode 
them :-)

Sebastian Herp wrote:

>Thank you, i have seen such headers and wondered what that means :-)
>
>My MTA *is* up to date and it doesn't mess with correctly formed headers
>(this mailing list is a perfect example). I can, of course, disable this
>function, but i wanted to let somebody know that there is something
>wrong with umlauts and such things in mailheaders ....
>
>(It's not only about the subject, the from-header can have umlauts, too)
>
>drDave wrote:
>
>  
>
>>Actually, this is not completely true afaik.
>>If you check out RFCs 2047 (http://www.faqs.org/rfcs/rfc2047.html) and
>>2231, you will see that there is a mechanism allowing you to specify
>>an encoding for your subject header. e.g.:
>>=?iso-8859-1?Q?R=FCckantwort_?=
>>
>>This RFC is far from perfect, but it is essential, especially for
>>countries where the whole writing system relies on non-ASCII characters.
>>It can sometimes be a problem if your MTA messes with these headers
>>and decode them instead of leaving that task up to the sole MUA... but
>>that's not really the sender's fault. It means your MTA is somehow not
>>up to date and should be fixed.
>>
>>I do not know if WP is respecting this RFC, if not it would indeed be
>>a good idea to make sure that the subject header is thus encoded
>>(probably UTF-8 would be a good choice) whenever sending mails from WP.
>>
>>HtH,
>>    
>>
>
>
>
>_______________________________________________
>hackers mailing list
>hackers at wordpress.org
>http://wordpress.org/mailman/listinfo/hackers_wordpress.org
>
>
>  
>




More information about the hackers mailing list