mirror of
https://github.com/balkian/gists.git
synced 2025-07-01 21:32:26 +00:00
git-subtree-dir: repos/6b6906b97267a0c5ac52 git-subtree-mainline: 73c547ec0c8860f6f5d5548a03330c7de823efd0 git-subtree-split: f223e351402a52e6480d962ed72b31afa453b683
9 lines
280 B
Python
9 lines
280 B
Python
a = u"codificación"
|
|
print a # u"codificación"
|
|
print type(a) # <type 'unicode'>
|
|
b = a.encode("utf-8")
|
|
print b # codificación # But it depends on your terminal settings
|
|
print type(b) # <type 'str'>
|
|
c = b.decode("utf-8")
|
|
print type(c) # <type 'unicode'>
|
|
print c # u"codificación" |