After reading: Immersion in Python: Unicode discussion
I was curious to try typing my name in indic script. I use v2.7.2-
>>> import sys
>>> sys.getdefaultencoding()
'ascii'
>>> name = u'\u0935\u0948\u092D\u0935'
>>> print name
वैभव
I expected it to print namegive me UnicodeError, since the parameter is defaultencodingset to a value ASCII, so automatic forcing to ASCIIfrom Unicodeshould not work.
What am I missing?
source
share