I have a data of a form:
v = "\xc5\x84"
This is a byte representation of an utf-8 encoded character “ń”.
How can I print >>ń<< using variable v?
I’m using python 2.7.2
In original the variable v contained string:
v = "\\xc5\\x84" (double backslashes)
vs
v = "\xc5\x84" (single backslashes)
which is by itself valid utf-8 character.
Edit In my machine the output depends on the shell/python used, as shown below.
As commented by Klaus a major actor here would be the locale setting in your system.
the machine has the following settings:
Independently of this setting, you get your character with