Re: MIME::Base64 bugs?




"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

.



Relevant Pages

  • Re: Cant type without clicking first
    ... Turning off Windows XP's popup blocker or SBC Yahoo's AntiVirus ... are disabled while Google Script Object is Enabled. ... >> Rob, In Windows XP, IE6, my Internet Zone security was already set to Medium, ... > It may also be useful to know if you have AutoComplete for Forms active ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Help with fileglob: Unix vs. Windows?
    ... use warnings; ... use strict; ... But this script doesn't do right in Windows: ...
    (perl.beginners)
  • Re: Newbie queries
    ... perldoc perldoc ... Not needed on Windows since .pl is probably "connected" with perl.exe, ... ie. script.pl in cmd.exe should perl.exe the script. ... use warnings; ...
    (comp.lang.perl.misc)
  • Re: Microsoft Warns of New Windows Flaw (March 19, 2003 )
    ... In WINDOWS SETUP in ADD/REMOVE PROGRAMS of Control Panel ... Uninstall Outlook Express, ... Java, Javascript, ActiveX and all the other script runner toys Billy ... Install WebWasher the spammers are terrified of free from ...
    (comp.security.misc)
  • Re: Microsoft Warns of New Windows Flaw (March 19, 2003 )
    ... In WINDOWS SETUP in ADD/REMOVE PROGRAMS of Control Panel ... Uninstall Outlook Express, ... Java, Javascript, ActiveX and all the other script runner toys Billy ... Install WebWasher the spammers are terrified of free from ...
    (comp.security.firewalls)