I have a string in python with some literal bytes and some literal ascii characters, e.g., print(s)
provides:
The message - \xe3\x83\xa9\xe3\x82\xa4 ... that was the message
Is there an easy way to reinterpret this string as bytes in python, and then decode to utf-16? Or do I have to manually search for and separate out the unicode characters myself?
If I could declare the string as a literal, I would be fine, e.g.,
b"The message - \xe3\x83\xa9\xe3\x82\xa4 ... that was the message".decode('utf-8')
but unfortunately I have a string variable.