Ticket #1484712 (closed Bugs: fixed)
Roundcube doesn't parse some IMAP charsets properly
| Reported by: | Gena01 | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.1-stable |
| Component: | Client Scripts | Version: | 0.1-rc2 |
| Severity: | minor | Keywords: | |
| Cc: |
Description (last modified by thomasb) (diff)
There's a bug that I experienced running against Dovecot in my setup.
[content-type] => text/plain; charset=ANSI_X3.4-1968
header got charset parsed as ANSI because of a bad regexp. It would parse it to ANSI and this is not a valid charset so I would get a missing Subject when viewing e-mails.
It took me a while to track this down, The fix is to edit the regexp in program/lib/imap.inc line 1302 to have updated regexp:
if (preg_match('/charset="?([a-z0-9\-\.\_]+)"?/i', $ctype_add, $regs))
$result[$id]->charset = $regs[1];
I basically added support for . and _ in charset. With this patch I am getting the messages displayed properly now.
Change History
Note: See
TracTickets for help on using
tickets.
