Ticket #1484597 (closed Bugs: invalid)

Opened 15 months ago

Last modified 15 months ago

UTF-8 content with content type ISO-8859 not handled

Reported by: gabtoth Owned by:
Priority: 5 Milestone:
Component: IMAP connection Version: 0.1-rc1
Severity: normal Keywords:
Cc:

Description

In a multipart mail message (text + HTML) when the content type is ISO-8859-*, but the content of the part is actually UTF-8, then replying or forwarding the message display garbage characters (UTF-8 will be encoded in UTF-8)

Change History

Changed 15 months ago by gabtoth

Solution:

File main.inc, function rcube_charset_convert: check for bad content type

$from = strtoupper($from);

+ if ( from != "UTF-8" && bin2hex(substr($str,0,3)) == "efbbbf") { + // already UTF-8, $from coding is bad + return $str; + }

$to = $to==NULL ? strtoupper(RCMAIL_CHARSET) : strtoupper($to);

Changed 15 months ago by thomasb

  • status changed from new to closed
  • resolution set to invalid

If the message specifies a wrong charset it's not a RoundCube bug when that message is not handled correctly. The fix you suggest checks for a BOM which is not necessarily existent in an UTF-8 coded string.

Note: See TracTickets for help on using tickets.