[dev] Problem with utf and MIME_Part::transferDecode()

Michael M Slusarz slusarz at bigworm.colorado.edu
Fri Dec 27 16:21:02 PST 2002


Quoting Jan Schneider <jan at horde.org
| 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.

How about the fix I just committed?

michael

______________________________________________
Michael Slusarz [slusarz at bigworm.colorado.eduThe University of Colorado at Boulder


More information about the dev mailing list