(keitai-l) Re: Fun with Base64 Decoding

From: Renfield Kuroda <Renfield.Kuroda_at_morganstanley.com>
Date: 10/25/01
Message-ID: <3BD7CAFB.DEFBD64D@morganstanley.com>
With  =?ISO-2022-JP?B?GyRCRnxLXDhsGyhC?= you should be able to decode as you
mentioned.

Can you expand on what "gibberish" means? It'll probably look like gibberish as
it's jis-encoded Japanese.

r e n

Ron Schei wrote:

> 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/ ]

--
ascii: r e n f i e l d
octal: \162 \145 \156 \146 \151 \145 \154 \144
hex: \x72 \x65 \x6e \x66 \x69 \x65 \x6c  \x64

e-business technologies | engineering and strategy

"Connecting people, ideas and capital,
we will be the world's first choice
for achieving financial aspirations"



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