summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorparimbra <parimbra@redhat.com>2010-06-09 17:12:48 +0530
committerparimbra <parimbra@redhat.com>2010-06-09 17:12:48 +0530
commit6d51800d426fef2036e3612b9e2659200357ee28 (patch)
tree1f7ad0a98cbd009a88597771236d0506b49904e2
parentd54a0440dea67f0c62044faf2611c437c01033ea (diff)
downloadAnjaliOldLipi.git-6d51800d426fef2036e3612b9e2659200357ee28.tar.gz
AnjaliOldLipi.git-6d51800d426fef2036e3612b9e2659200357ee28.tar.xz
AnjaliOldLipi.git-6d51800d426fef2036e3612b9e2659200357ee28.zip
adding Devanagari ikar for prebase handling
-rwxr-xr-xpayyans/payyans/payyan.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/payyans/payyans/payyan.py b/payyans/payyans/payyan.py
index 2ec4794..34d8df1 100755
--- a/payyans/payyans/payyan.py
+++ b/payyans/payyans/payyan.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env pythno
# -*- coding: utf-8 -*-
# Payyans Ascii to Unicode Convertor
# Copyright 2008-2009 Santhosh Thottingal <santhosh.thottingal@gmail.com>,
@@ -56,6 +56,11 @@ class Payyan:
ascii_text = ascii_text[:-1] + ascii_letter[0] + ascii_text[-1:] + ascii_letter[1]
elif (letter == 'െ') | (letter == 'േ') |(letter == '്ര'): #only prebase
ascii_text = ascii_text[:-1] + ascii_letter + ascii_text[-1:]
+ elif (letter == '्र'): #only prebase
+ ascii_text = ascii_text[:-1] + ascii_letter + ascii_text[-1:]
+ # Devanagari prebase
+ elif (letter == 'ि') | (letter == 'िं') : #only prebase
+ ascii_text = ascii_text[:-1] + ascii_letter + ascii_text[-1:]
else:
ascii_text = ascii_text + ascii_letter
index = index+charNo
@@ -182,7 +187,7 @@ class Payyan:
def isPrebase(self, letter):
unicode_letter = letter.encode('utf-8')
if( ( unicode_letter == "േ" ) | ( unicode_letter == "ൈ" ) | ( unicode_letter == "ൊ" ) | ( unicode_letter == "ോ" ) | ( unicode_letter == "ൌ" )
- | ( unicode_letter == "്ര" ) | ( unicode_letter == "െ" )
+ | ( unicode_letter == "്ര" ) | ( unicode_letter == "െ" ) | ( unicode_letter == "ि" ) | ( unicode_letter == "िं" )
):
return True
else: