[dev] Email charset encode problem

Michael M Slusarz slusarz at horde.org
Tue Aug 31 16:33:00 UTC 2010


Quoting Gonçalo Queirós <goncalo.queiros at portugalmail.net>:

> Hi there list.
> I'm having an issue with email messages encoded in ISO-8859-1.
> I don't know if the debug I've done is enough, but its actually a
> "scary" part of the code, so here's my findings...
> When i open a message with charset = ISO-8859-1 i can see it on my
> computer, but not on the server. The difference is that the server ajax
> request for the message preview doesn't bring the "message" part on
> JSON. From my debug i found out that Horde_Serialize::_serialize has a
> bit of code that only works with PHP 5.3+ (thus the problem happening on
> the server and not on my pc, since the server is 5.2)
>
> I don't know exactly what maybe wrong from all this, what i found out is
> that on the same function (Horde_Serialize::_serialize) there's a call
> to Horde_String::convertCharset that is being passed $params whose value
> is UTF-8..but the $data is actually encoded in ISO-8859-1..Then the
> json_encode call breaks because $data was not actually converted and
> this error is only catched by PHP 5.3 +...

Possibly http://bugs.horde.org/ticket/9201

michael

-- 
___________________________________
Michael Slusarz [slusarz at horde.org]




More information about the dev mailing list