[Tickets #1423] NEW: IMP4 japanese subject problem

bugs at bugs.horde.org bugs at bugs.horde.org
Tue Feb 22 01:56:03 PST 2005


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=1423
-----------------------------------------------------------------------
 Ticket             | 1423
 Created By         | hiromi at tac.tsukuba.ac.jp
 Summary            | IMP4 japanese subject problem
 Queue              | IMP
 Version            | RELENG_3
 State              | Unconfirmed
 Priority           | 1. Low
 Type               | Bug
 Owners             | 
-----------------------------------------------------------------------


hiromi at tac.tsukuba.ac.jp (2005-02-22 01:56) wrote:

Problem: viewing of japanese subject strings collaped sometimes
   (in mailbox view and message view)

Reason:
  Japanese mails uses iso-2022-jp(7 bit) encoding, for example;
    Subject: =?ISO-2022-JP?B?GyRCJSYlIyVrJTk2bj18GyhC?=

  This string is decoded by decode() in horde/lib/Horde/MIME.php;
       (line 351)
        case 'B':
        case 'b':
            $decoded = urldecode(base64_decode($encoded_text));
            $decoded = String::convertCharset($decoded, $charset,
$to_charset);

  The result string of base64_decode() is;
    esc $ B % & % # % k % 9 6 n = | esc ( B    (18 bytes total)
                        ^ ^ ^
  these '%9' and '6n' repesent japanese characters,
  but urldecode() convert '%96' to another one !!

  So, urldecode() is not need for iso-2022-jp encoding.





More information about the bugs mailing list