(keitai-l) Fun with Base64 Decoding

From: Ron Schei <ron_at_schei.com>
Date: 10/25/01
Message-Id: <4.3.2-J.20011025164205.03f613b0@www.schei.com>
Hello,

Tech question
I've written a perl script to manipulate pop mail from a keitai, but I'm 
having trouble with Japanese subject lines.
Using Perl with the MIME::Base64 module, I'm trying to turn this:
=?ISO-2022-JP?B?GyRCRnxLXDhsGyhC?=
back into the original
日本語

Here's what I know doesn't work....

use MIME::Base64;

### ... detect a Base64 encoded line .. ###
###   strip control characters, leaving this: GyRCRnxLXDhsGyhC ###

$newline = decode_base64($line);

at which point $newline is gibberish.
I've tried jcode::converting it every-which-way, but nothing seems to work.
The base64 encoding of 日本語 (EUC) seems to be
xvzL3Ljs
which decodes just fine.
Any ideas on how to turn a Base64 encoded ISO-2022-JP string back into 
readable S-JIS would be most appreciated!
Thanks,
Ron


[ Need archives? How to unsubscribe? http://www.appelsiini.net/keitai-l/ ]
Received on Thu Oct 25 10:58:25 2001