[horde] MIME and plain text message
Dmitriy MiksIr
miksir at maker.ru
Wed Apr 12 08:42:34 PDT 2006
Michael M Slusarz wrote:
> Quoting Dmitriy MiksIr <miksir at maker.ru>:
>
>> Hello.
>> How i understand, all IMAP messages parsed by MIME library. When the
>> create MIME Part, charset from this MIME part of message used.
>> But if message plain/text - which charset will be used - default or
>> from headers of message?
>
> from the Content-type header. If no valid MIME Content-Type header is
> found, then US-ASCII (or, in IMP 4.1.1+, the default viewing charset) is
> used.
>
>> This question because i got troubles with display plain text 8bit
>> letter. How i understand, used default charset (us-ascii) even if
>> charset= set in content-type of message, isn't it?
>
> Because your message is not a MIME message - So it defaults to
> us-ascii. I pretty much can guarantee that your message is missing a
> 'MIME-Version' header.
>
How i understand, it's provided by imap-client - if no MIME-Version set,
no charset returned (even if charset specify in content-type). But
why...? Is this broke some RFC?
Now, i try create workaround for this? For example, fetch and parse
headers manually in _setInfo method of MIME_Structure, if
$part->ifparametes is false. But can you tell me, how get message index
(for MIME_Headers) in _setInfo? Now i try add index to $part structure
(in imp/lib/MIME/Contents.php)... but may be more simple way?
> michael
>
> ___________________________________
> Michael Slusarz [slusarz at horde.org]
> --Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>
More information about the horde
mailing list