I am working on simple python script. Unluckily some data I must work with, are stored as follows:
My data
trouble_string = '{\"N\": \"Centr\\u00e1lna nervov\\u00e1 s\\u00fastava\"}'
What I want to achieve
I want to convert string in following format.
decoded_string = '{"N": "Centrálna nervová sústava"}'
Problem
You can see there are accented letters numerically encoded. Is there any smart way how to decode this string?
What I tried
bytes(s, encoding='utf-8').decode(encoding='utf-16')
# outputs: '䌢湥牴畜〰ㅥ湬\u2061敮癲癯畜〰ㅥ猠畜〰慦瑳癡≡'
bytes(s, encoding='utf-16').decode(encoding='utf-8')
# outputs: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte