]> granicus.if.org Git - fribidi/commitdiff
Clearing some typos.
authorbehnam <behnam>
Sat, 8 Jan 2005 13:26:58 +0000 (13:26 +0000)
committerbehnam <behnam>
Sat, 8 Jan 2005 13:26:58 +0000 (13:26 +0000)
test/caprtl2unicode.py

index 741e32c1b572e696ea06c00169876fdf442331a3..344a89ae5accdf76b32a7c86762d0c661aeaebad 100755 (executable)
@@ -16,7 +16,7 @@ the mapping are:
 Author:
   Behnam Esfahbod, 2005
 
-Copyright (C) 2005 Sharif FarsiWeb, Inc
+Copyright (C) 2005 Sharif FarsiWeb, Inc.
 
 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
@@ -87,9 +87,7 @@ def convert2unicode (caprtl):
 def convert2utf8 (caprtl):
     """Converter from CapRTL to UTF-8"""
 
-    mytext = str(caprtl)
-    for x in escape.keys(): mytext = mytext.replace(x, escape[x])
-    return unicode(mytext).translate(mapping).encode('utf-8')
+    return convert2unicode(caprtl).encode('utf-8')
 
 
 
@@ -98,7 +96,7 @@ if __name__ == '__main__':
 
     for mytext in sys.stdin.readlines():
        mytext = mytext[:-1]
-       sys.stdout.write(caprtl_to_utf8.convert(mytext))
+       sys.stdout.write(convert2utf8(mytext))
        print
 
 # vi:set ai sw=4: