[dev] Problem with utf and MIME_Part::transferDecode()
Jan Schneider
jan at horde.org
Fri Dec 27 19:29:29 PST 2002
MIME_Part::transferDecode() and MIME_Part::transferDecodeContents() take an
optional charset parameter. But this parameter is never used where these
methods are called.
That's why I set the the charset in transferDecode() explicitely if it
wasn't passed as a parameter. This works fine for all text parts that are
really encoded in a certain charset but need to displayed in another to the
user.
Unfortunately that breaks mime parts that don't have a specific charset like
binary attachments.
There are serveral ways to fix this. For one transferDecode(Contents) should
always be called with the correct charset where appropriate. Or
MIME_Part::getCharset() should only return a charset if there is one
explicitely set. Or the charset conversion has to be moved to a completely
different place.
Anyway, all of these solutions are behind my scope, so I hope someone else
can fix this.
Jan.
--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft
More information about the dev
mailing list