[imp] Problem of wrapping multi-byte body.

Michael M Slusarz slusarz at mail.curecanti.org
Thu May 12 08:20:24 PDT 2005


Quoting Jinhyok Heo <novembre+dated+1116339918.5cd529 at ournature.org>:

> On 12 May 2005, Jinhyok Heo wrote:
>
>> On 12 May 2005, Michael M. Slusarz wrote:
>>
>>> Quoting Jinhyok Heo
>>> <novembre+dated+1116295937.1f4d48 at ournature.org>:
>>>> Is there any patch to fix it, yet?
>>>
>>> Yes - you need to use HEAD though.
>>
>> The difference between the HEAD and the latest release is not small
>> and it seems not an small job to fix the error with codes from the
>> HEAD.
>>
>> Anyone has a simpler way to fix it?

Unfortunately not.  The issue with the wrapping has to do with flowed 
format and multibyte-characters that was fixed in HEAD and not 
backported for some reason (I can't remember why... i think it could be 
backported but it would muck with the way 4.0.x sends messages).

>> Or, I could just turn off the wrapping. Just setting the value of
>> $_prefs['wrap_width'] to 0 causes wrapping on every word and doesn't
>> stop wrapping. Can I turn it off safely somewhere?
>
> I just found where I should change to turn off the wrapping. I simply
> added "if($length == 0) return $text;" at the head of String::wrap().

This is bad.  You are breaking RFCs by doing this so this is not a 
viable solution, IMHO (RFCs say lines SHOULD be less than 78 characters 
+ CRLF and MUST NOT be longer than 998 characters + CRLF.)  It is quite 
possible that some mail server is going to chop your messages if you 
continue to use this solution.

michael

_______________________________________
Michael Slusarz [slusarz at curecanti.org]


More information about the imp mailing list