1

I have a base64 string in python that is not in ASCII format, so I want base64.b64decode(string) to output UTF-8 rather then ASCII.

Sample base64 string: mBkVO/Me3Awiy94yFCagxA==
Sample output: \x85\xe9e\xa2`dT\xef\xcc{p0\x8b/x\xc8P\x9a\x83\x10
Desired Output: Some text

  • You have replaced nice, accessible text with an inaccessible image. We can't tell what actual data you want from a picture. Please read [Why should I not upload images of code/data/errors?](https://meta.stackoverflow.com/q/285551/354577) – ChrisGPT was on strike Aug 28 '23 at 15:45
  • So the desired output should be `\x98\x19\x15;\xf3\x1e\xdc\x0c"\xcb\xde2\x14&\xa0\xc4` which is neither valid UTF-8 nor valid ASCII either. – AmigoJack Sep 02 '23 at 23:50

0 Answers0