Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #49330

Re: Devnagari Unicode Conversion Issues

Date 2013-06-27 16:28 +0100
From MRAB <python@mrabarnett.plus.com>
Subject Re: Devnagari Unicode Conversion Issues
References <c8ea987a-a493-4adc-a35d-11a82f1bd03a@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.3932.1372346917.3114.python-list@python.org> (permalink)

Show all headers | View raw


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")
नेपाली

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Devnagari Unicode Conversion Issues darpan6aya <akshay.ksth@gmail.com> - 2013-06-27 08:05 -0700
  Re: Devnagari Unicode Conversion Issues MRAB <python@mrabarnett.plus.com> - 2013-06-27 16:28 +0100
  Re: Devnagari Unicode Conversion Issues darpan6aya <akshay.ksth@gmail.com> - 2013-06-27 08:39 -0700
    Re: Devnagari Unicode Conversion Issues Dave Angel <davea@davea.name> - 2013-06-27 12:28 -0400

csiph-web