Re: MIME::Base64 bugs?
- From: "Sisyphus" <sisyphus1@xxxxxxxxxxxxxxxxx>
- Date: Tue, 5 Jun 2007 19:41:59 +1000
"sonet" <sonet.all@xxxxxxxxxxxxx> wrote in message news:f436e2$f6u$1@xxxxxxxxxxxxxxxxxxxx
The MIME::Base64 will convert \n to \r\n.
$a="1234\n4567\n";
$a=encode_base64($a,0);
print decode_base64($a);
The result is 1234\r\n4567\r\n.
Can't reproduce that on any of my Win32 builds of perl, or on linux:
A copy'n'paste from Windows:
-----------------------------
C:\pscrpt>type try.pl
use warnings;
use MIME::Base64;
$a="1234\n4567\n";
$a=encode_base64($a,0);
$z = decode_base64($a);
print "\\r => ", ord("\r"), "\n";
print "\\n => ", ord("\n"), "\n";
for(0..length($z) - 1) {
print ord(substr($z, $_, 1)), " ";
}
C:\pscrpt>perl try.pl
\r => 13
\n => 10
49 50 51 52 10 52 53 54 55 10
C:\pscrpt>
-----------------------------
And the same script produces the same output on linux for me.
Cheers,
Rob
.
- References:
- MIME::Base64 bugs?
- From: sonet
- MIME::Base64 bugs?
- Prev by Date: Re: How to get GIF support with Perl-GD library? (Can't locate object method "newFromGif")
- Next by Date: Net::Telnet Juniper display XML troubles
- Previous by thread: MIME::Base64 bugs?
- Next by thread: Re: MIME::Base64 bugs?
- Index(es):
Relevant Pages
|