Reputation: 1
I got an file beginning like:
‹ ´»W“äH–ú~Eß~…
I know it's an XML file, but I can't find the correct way to decode and encode it. Any ideas?
Tried encoding in Python with the following results:
>>> text = "‹ ´»W“äH–ú~Eß~…"
>>> print(text)
‹ ´»W“äH–ú~Eß~…
>>> text.encode("utf-8")
b'\x1f\xe2\x80\xb9\x08 \x03\xc2\xb4\xc2\xbbW\xe2\x80\x9c\xc3\xa4H\xe2\x80\x93\x1e\xc3\xba~\x7fE\xc3\x9f~\xe2\x80\xa6'
>>> text.encode("windows-1252")
b'\x1f\x8b\x08 \x03\xb4\xbbW\x93\xe4H\x96\x1e\xfa~\x7fE\xdf~\x85'
Upvotes: 0
Views: 18