If you are trying to use it in a json
, you should use json.loads()
.
json.loads('"\u0096"')
Although with that said, I don't think that the encoded representation is the character that you mean it to be. I make -
to be \u002d
and your representation to be whitespace.
You can easily do this with larger strings from your files, for example:
>>> astring = "\u0048\u0065\u006c\u006c\u006f\u002c \u0077\u006f\u0072\u006c\u0064\u0021"
>>> new = json.loads(astring)
>>> new
'Hello, world!'