mhonarc-dev

Re: wrong @ conversion in iso-2022-jp text

2003-02-14 12:19:28
On February 14, 2003 at 13:00, "Takashi P.KATOH" wrote:

Sugihara san (who has reported about the problem of
non-ASCII encoded filenames to this mailing list some days
ago)

I had a hard time understanding the reports, so I apologize
for not understanding the real problem.

Side Note: The use of "=?..?.?..?=" in parameter values is not allowed
according the main MIME RFCs.  The encoding format specified in
RFC 2184 should be used.

reported to me that v2.6.0 with iso2022jp.pl converts
Japanese text improperly.

For example,

| Subject: =?iso-2022-jp?B?GyRCQCQzJhsoQg==?=

should be decoded as

| ^[ $ B @ $ 3 & ^[ ( B         # SE-KAI, means WORLD
       ^^^ ^^^
       SE  KAI

but v2.6.0 converts this as

| ^[ $ B @ $ 3 & ^[ ( B    # BROKEN!

Ahh!  Now I get it.

<CHARSETCONVERTERS>
iso-2022-jp; iso_2022_jp::str2html; iso2022jp.pl
</CHARSETCONVERTERS>

The following diff should fix the problem:

--snip--
Index: ewhutil.pl
===================================================================
RCS file: /cvsroot/mhonarc/mhonarc/MHonArc/lib/ewhutil.pl,v
retrieving revision 2.11
diff -p -u -r2.11 ewhutil.pl
--- ewhutil.pl  18 Jan 2003 02:57:34 -0000      2.11
+++ ewhutil.pl  14 Feb 2003 19:02:00 -0000
@@ -31,7 +31,7 @@ my %HTMLSpecials = (
   '&'  => '&amp;',
   '<'  => '&lt;',
   '>'  => '&gt;',
-  '@'  => '&#x40;',
+  # '@'        => '&#x40;',  # XXX: Screws up ISO-2022-JP conversion
 );
 
 ##---------------------------------------------------------------------------
--snip--

I've commited the change into CVS, and the patch will be available
in the next snapshot build (2003-15-02).

I've submitted a formal bug report so we can properly track the problem.

Please test out the fix.

--ewh

---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-DEV

<Prev in Thread] Current Thread [Next in Thread>