You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if there are multiple escape sequences back to back, the .decode(x) may "eat" trailing escape sequences/special characters.
base64.b64decode(x).decode('utf-8')
for example, when parsing HL7 messages from base64 encoding I had the following case:
b"\\.br\\\n"
this should decode to: "\.br\\n"
but instead is translated to "\.br"
I was able to work around by doing the decode in two steps and using a replacement of b"\\.br\\\n" to b"\n\n" as that what the decoded message should look like.
Your environment
CPython versions tested on: 3.10.7
Operating system and architecture: Windows Server 2016 64 bit