I've gone through about 20 threads but don't seem to be able to find an answer to what I hoped was a simple question!
I have a unicode-encoded byte "\xbf" which translates to a "¿" character.
If I encode the character as follows:  u"¿".encode("cp1252") it outputs "\xbf".  How can I return this back to a "¿" character for display on screen?
No matter what I attempt, I seem to get an ordinal not in range(128) error.
EDIT: A further example of this is simply using chr(191), which also gives the result "\xbf".  How can I make this print the ASCII character?
Any and all help appreciated!
So after much experimentation and for reasons I don't fully understand, the following code works:
print "%s" %("\xbf").decode("cp1252")
It's a workable solution so I'll call this one solved!
Unable to convert unicode byte to ASCII