using iconv()

Evgeny Kotsuba evgen at shatura.laser.ru
Sun Jan 9 19:01:50 CET 2005


Pavel Kankovsky wrote:

>On Sat, 8 Jan 2005, Evgeny Kotsuba wrote:
>
>  
>
>>For example, if we have 8-bit characters in heades like:
>>--------------------------
>>From: "Ń?â??â??â??â?Ľâ??â?Š" <radiodetali at fromru.com>
>>Subject: Đ?â?Ľâ?§â??â?´â??
>>Date: Wed, 15 Oct 2003 15:59:21 +0400
>>MIME-Version: 1.0
>>Content-Type: text/html;
>>        charset="koi8-r"
>>X-Priority: 3
>>---------------------------
>>So when we find charset we need go back  to From: and Subject.
>>    
>>
>
>No. The example you gave is a malformed message and whoever made a MUA
>generating such a message and/or displaying such a message "correctly"
>deserves a bullet into his or her head.
>
>Non-ASCII text is prohibited in RFC 2822 headers (see section 2.2), and
>Content-Type header does not affect the interpretation of other header
>lines. Non-ASCII headers must be encoded using methods described in RFC
>2047 and these methods incorporate the desired encoding into the encoded
>value.
>  
>
Can you then teach Microsoft  engineers to read RFCs and doesn't  break 
RFCs ?
Can you then force spammerz  not  break RFCs ?
What shell I do with  all those words ?  To throw it away ? 

By the way, I doesn't understand any reason for using  
replace_nonascii_characters  in  init_charset_table() :
void init_charset_table(const char *charset_name)
{
......
           if (replace_nonascii_characters &&
               charset->allow_nonascii_replacement)
               map_nonascii_characters();
...
i.e. if we have replace_nonascii_characters set, then all will be 
converted to ?? in other places,  but if we doesn't use 
replace_nonascii_characters, but still want to ignore  some codepages,  
say, azian  and charset->allow_nonascii_replacement is set - then we 
can't do it.  So I commented it  in my code
           if ( /* replace_nonascii_characters && */
               charset->allow_nonascii_replacement)

SY,
EK




More information about the bogofilter-dev mailing list