What text format is this:
\xe1\x984a\x82@Z\xb4\x85\xd0
I would like to convert this to readable format. I attempted decoding with utf-16 but leads to error. Also encoding to ascii does not work.
Asked
Active
Viewed 1,342 times
-1

tom
- 21,844
- 6
- 43
- 36

user2685079
- 104
- 9
-
2Without knowing the encoding, you are not going to be able to convert it. – James Nov 10 '17 at 03:02
-
will you provide your error list? – R.A.Munna Nov 10 '17 at 03:28
1 Answers
0
From My understanding \xe1\x984a\x82@Z\xb4\x85\xd0
is look like bytes stream.
so you can convert in readable format like this.
>>> b'\xe1\x984a\x82@Z\xb4\x85\xd0'.decode('utf-8','ignore')
'4a@Z'
you byte stream string also give the output in integer format like this.
>>> int.from_bytes(b'\xe1\x984a\x82@Z\xb4\x85\xd0', byteorder='big', signed=True)
-143585681428579525294640

R.A.Munna
- 1,699
- 1
- 15
- 29
-
Not the desired result. Also, when I encode to ascii: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position 0: ordinal not in range(128) – user2685079 Nov 10 '17 at 04:23
-