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

chrislit at crosswire.org chrislit at crosswire.org
Fri Jan 4 06:45:55 MST 2013


Author: chrislit
Date: 2013-01-04 06:45:54 -0700 (Fri, 04 Jan 2013)
New Revision: 410

Modified:
   trunk/modules/python/usfm2osis.py
Log:
strip BOM, if present in USFM

Modified: trunk/modules/python/usfm2osis.py
===================================================================
--- trunk/modules/python/usfm2osis.py	2013-01-04 13:01:07 UTC (rev 409)
+++ trunk/modules/python/usfm2osis.py	2013-01-04 13:45:54 UTC (rev 410)
@@ -1312,6 +1312,8 @@
                     print(('WARNING: Encoding "' + encoding + '" unknown, processing ' + sFile + ' as UTF-8.'))
                     encoding = 'utf-8'
 
+    osis = osis.lstrip(unichr(0xFEFF))
+
     # call individual conversion processors in series
     osis = cvtPreprocess(osis, relaxedConformance)
     osis = cvtRelaxedConformanceRemaps(osis, relaxedConformance)




More information about the sword-cvs mailing list