Quoting Ruben Squartini <[email protected]>:

The Horde_Utils package turned from 2.2.1 to 2.2.2, now it shows one of the messages (the one that is only text) as a text block (not more "Unable to view message...") in the preview window, but nothing is shown in the reply or forward windows (until I uncheck the "HTML composition" checkbox).

I don't know if I can send attachments through the list, if they fail I'll send them directly to your address. I hope this can help solve the problem.

The problem is that the message is sent in ISO-8859-1, but the MIME headers report that the message is in UTF-8. PHP's htmlspecialchars() is very fussy about charsets - if you give it the wrong information, it returns a blank string. The ENT_SUBSTITUTE flag to the function would be useful, but it is only supported as of PHP 5.4 (http://php.net/htmlspecialchars).

I guess we can do the same hack as we do with malformed headers in that we cycle through the two most common charset options, at least for Western locales (ISO-8859-1/Windows-1252 and UTF-8), to attempt. But at some point, Garbage in = Garbage Out. So there is a chance that a message will continue to be undisplayable, since it is impractical to attempt to convert from every charset known to man.

Although we should probably be smarter about displaying a warning in IMP if the resulting string is empty, but the initial data input was not.

michael

___________________________________
Michael Slusarz [[email protected]]

--
imp mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: [email protected]

Reply via email to