[Implemented] A more tolerant Base64Decode()

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
infratec
Always Here
Always Here
Posts: 7591
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

[Implemented] A more tolerant Base64Decode()

Post by infratec »

Hi,

I had to decode mail attachments.
And I failed.
http://www.purebasic.fr/english/viewtop ... =4&t=49046
especially:
http://www.purebasic.fr/english/viewtop ... 48#p373048

The PB Base64Decode() did not ignore CR LF between the characters.
So I have to remove all CRLFs out of the data buffer before I can use it.

If I do this, it is nearly the same effort than to write an own Base64Decoder().
And with this it uses less memory, I don't need a second target buffer.

So please build in, that values below 'A' are ignored.

Bernd