Re: MIME::Base64 bugs?



sonet wrote:

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.

Maybe this is caused by the following: the microsoft implementation of stdio
converts the "\n" to a "\r\n" automaticly on input/output. so you can have
a "\n" in memory throughout your whole perl-script, but upon printing or
writing to file it gets converted ...

But i'm not quite sure about this, maybe there are also different flavours
of stdio, which behave differently, i don't know.

HTH,
Marcus

--
-mb-
.



Relevant Pages

  • Re: Dumping/patching all application static memory
    ... > accept that it when restarted use the new stdio descriptors ... > and that you will need to copy some of the memory mapped ... > contents of the mappings against the file contents. ... > modified once you restart, then it will get even more ...
    (comp.os.linux.development.apps)
  • Re: slow performance of stdio
    ... The memory appears to be fragmented and the 8K malloc attempted by ... fails, the library than switches to read by one byte at the time. ...
    (comp.os.linux.development.apps)