[sword-svn] r415 - trunk/modules/python

chrislit at crosswire.org chrislit at crosswire.org
Sat May 11 09:47:53 MST 2013


Author: chrislit
Date: 2013-05-11 09:47:52 -0700 (Sat, 11 May 2013)
New Revision: 415

Modified:
   trunk/modules/python/usfm2osis.py
Log:
fixed Python3 compatability


Modified: trunk/modules/python/usfm2osis.py
===================================================================
--- trunk/modules/python/usfm2osis.py	2013-04-10 16:18:22 UTC (rev 414)
+++ trunk/modules/python/usfm2osis.py	2013-05-11 16:47:52 UTC (rev 415)
@@ -1312,7 +1312,10 @@
                     print(('WARNING: Encoding "' + encoding + '" unknown, processing ' + sFile + ' as UTF-8.'))
                     encoding = 'utf-8'
 
-    osis = osis.lstrip(unichr(0xFEFF))
+    if sys.version_info[0] < 3:
+        osis = osis.lstrip(unichr(0xFEFF))
+    else:
+        osis = osis.lstrip(chr(0xFEFF))
 
     # call individual conversion processors in series
     osis = cvtPreprocess(osis, relaxedConformance)




More information about the sword-cvs mailing list