On Tue Jan 29 11:39:58 2002 +0000 [EMAIL PROTECTED] wrote:
>On Mon, Jan 28, 2002 at 10:11:05PM +0200, Richard ??epas wrote:
>> Yes, encode_mimewords can output more then one encoded word, length
>> of each one depends on encoding & other circumstances but should not
>> exceed 78 bytes in the worst case.
>
>A slight extra problem is that MIME::Words and Mail::Header
>don't really get along very well together.
>
>It seems that Mail::Header splits up some headers differently
>from others. If the header is mentioned in the magical internal
>hash %Mail::Header::STRUCTURE, then the header is split up on
>whitespace, commas and semi-colons, eg:
>
>From: =?utf-8?Q?Richard Jones?=
> <[EMAIL PROTECTED]>
It should have _ instead of space or two encoded words instead of one.
>
>But otherwise (eg. for Subject headers), Mail::Header will split
>at an arbitrary location based on length only. This has the effect
>of splitting the "word" across lines, which breaks things.
>
>Unfortunately adding %Mail::Header::STRUCTURE{subject} doesn't
>seem to be the answer, because I can't necessarily guarantee
>that the subject line will contain any whitespace. So it looks
If you use encode_mimewords (that patched version) and it gets
encoded to words, it will contain whitespace if it is long enough.
Anyway it looks like Mail::Header does what he shouldn't do, i.e.
folding lines without good reason.
--
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/