[Tickets #9020] Re: Subject charset problem
bugs at horde.org
bugs at horde.org
Sat May 15 16:02:52 UTC 2010
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/9020
------------------------------------------------------------------------------
Ticket | 9020
Updated By | george at polarismail.com
Summary | Subject charset problem
Queue | IMP
Version | 4.3.7
Type | Bug
State | Not A Bug
Priority | 2. Medium
Milestone |
Patch |
Owners |
------------------------------------------------------------------------------
george at polarismail.com (2010-05-15 12:02) wrote:
>> It could also be the imap server's fault. If you need more support,
>> please ask on the mailing list.
>
> Hi Jan,
>
> I just fixed the issue by adding the following in mailbox.php at line 737:
> $msg['subject']=utf8_encode($msg['subject']); right after
>
> $msg['subject'] = $imp_ui->getSubject($ob->subject);
>
>
> the code now looks like:
> if (!empty($ob->subject)) {
> $msg['subject'] = $imp_ui->getSubject($ob->subject);
> $msg['subject']=utf8_encode($msg['subject']);
> }
>
> this effectively solves the problem and displays the characters
> properly. Can you confirm if this is just a bug on our systems ( and
> therefore we should make a note of it and update IMP ourselves ) or
> if it's a general issue with IMP that will be fixed in future
> releases ?
>
> We also had a very hard time with subjects encoded with ISO-8859. I
> submitted more info to the mailing list but basically the solution
> was to have NLS::getCharset return ISO-8859-1 instead of UTF-8
>
I just realized that encoding the subject to UTF8 also fixes the
NLS::getCharset() 'bug' I noticed earlier. Since the subject is
already UTF8 there's no need to have that function return ISO-8859-1
The modified line in mailbox.php simply has to look like:
$msg['subject'] = utf8_encode($imp_ui->getSubject($ob->subject));
More information about the bugs
mailing list