Devnagari Unicode Conversion Issues

MRAB python at mrabarnett.plus.com
Thu Jun 27 11:28:43 EDT 2013


On 27/06/2013 16:05, darpan6aya wrote:
> How can i convert text of the following type
>
>      नेपाली
>
> into devnagari unicode in Python 2.7?
>
Is that a bytestring? In other words, is its type 'str'?

If so, you need to decode it. That particular string is UTF-8:

 >>> print "नेपाली".decode("utf-8")
नेपाली




More information about the Python-list mailing list