<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 10, 2015 at 9:30 AM, Baiju Muthukadan <span dir="ltr"><<a href="mailto:baiju@muthukadan.net" target="_blank">baiju@muthukadan.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi,<br>
<br>
I have a huge Malayalam text where vowel forms are encoded in different ways.<br></blockquote><div><br></div><div><br></div><div>This should work</div><div><br></div><div><div>#!/usr/local/bin/python</div><div># -*- coding: utf-8 -*-</div><div>import unicodedata</div><div><br></div><div>unicode_string = u"കോ"</div><div>print [ <a href="http://unicodedata.name">unicodedata.name</a>(c) for c in unicode_string ]</div><div>normalized = unicodedata.normalize('NFC', unicode_string)</div><div>print [ <a href="http://unicodedata.name">unicodedata.name</a>(c) for c in normalized ]</div></div><div><br></div><div>Output:</div><div><br></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">['MALAYALAM LETTER KA', 'MALAYALAM VOWEL SIGN EE', 'MALAYALAM VOWEL SIGN AA']
</span><br>['MALAYALAM LETTER KA', 'MALAYALAM VOWEL SIGN OO']<br>
<br></span></div></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div></div>Santhosh Thottingal<br></div><a href="http://thottingal.in" target="_blank">http://thottingal.in</a><br></div></div></div></div>
</div></div>