1
0
mirror of https://github.com/balkian/gists.git synced 2025-06-30 21:02:28 +00:00
J. Fernando Sánchez f48bab94dd Move files
2021-10-30 15:23:01 +02:00

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"