Determining if a string is base64 or uu encoded?

Terry Reedy tjreedy at udel.edu
Mon Nov 25 22:09:24 EST 2002


"Colin Cashman" <ccashman at attbi.com> wrote in message
news:99BE9.139964$nB.11463 at sccrnsc03...
> Is there a function that given a string or file (or Message, etc.)
will
> determine whether the string or file is encoded, and if so, what
type of
> encoding that is (base64 vs. uuencoding)?

Brute force method would be to run string thru both decoders (both are
somewhere in library) and see which, if either, completes without
protest.

TJR





More information about the Python-list mailing list