[FriBidi-commit] fribidi/test caprtl2unicode.py,1.1,1.2

Behnam Esfahbod behnam@freedesktop.org
Sat Jan 8 05:27:00 PST 2005


Update of /cvs/fribidi/fribidi/test
In directory gabe:/tmp/cvs-serv2824

Modified Files:
	caprtl2unicode.py 
Log Message:
Clearing some typos.


Index: caprtl2unicode.py
===================================================================
RCS file: /cvs/fribidi/fribidi/test/caprtl2unicode.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- caprtl2unicode.py	5 Jan 2005 16:45:56 -0000	1.1
+++ caprtl2unicode.py	8 Jan 2005 13:26:58 -0000	1.2
@@ -16,7 +16,7 @@
 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 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 @@
 
     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:



More information about the fribidi-commit mailing list