Sometimes it is necessary to view the unicode encoding of a special character or to see the display of a certain unicode code. Here is some example code.
print '\xe6\x8d\xae'.decode("utf-8")
<displays the unicode character>
print repr(<the unicode character here>)
'\xe6\x8d\xae'
Tuesday, October 31, 2006
Subscribe to:
Posts (Atom)