anyone here got a function to find is a string is base64 encoded?

Mark Brownell gizmotron at earthlink.net
Sun Jul 25 19:21:44 CDT 2004


On Sunday, July 25, 2004, at 04:55 PM, Wouter wrote:

> Just tested on some large base64Encoded imagedata in the raw source of 
> a mail
>
> a "+" should be added to the reference string:
>
>       if i is not in "abcdefghijklmnopqrstuvwxyz1234567890/=" then 
> return false
>
> should become
>
>      if i is not in "abcdefghijklmnopqrstuvwxyz1234567890+/=" then 
> return false
>
> May be there are other legal characters to test for, please add them 
> too.
>
> Greetings,
> WA

I just realized that empty space is not in the base64 character set. So 
if you know that it's either plain text with words and spaces or 
encoding then all you need do is check for the spaces between words.

Mark



More information about the use-livecode mailing list