[BangPypers] converting utf to octal
sandipb at foss-community.com
Tue Dec 14 21:21:18 CET 2010
On Tue, Nov 23, 2010 at 04:35:39PM +0530, Kenneth Gonsalves wrote:
> say I have an indic (tamil) string like நான். This is actually
> represented by the following:
> 0x0ba8,0x0bbe,0x0ba9,0x0bcd. How can I convert the above string into
> these characters - or at least into base 10 integers?
Saw this old post just now.
Kenneth, did you find a solution?
Is there any Unicode-ignorant kind of mistake I am doing by using this?
>>> ["%0x" % ord(c) for c in u"நான்"]
['ba8', 'bbe', 'ba9', 'bcd']
More information about the BangPypers