summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Little <chrislit@crosswire.org>2013-01-04 13:45:54 +0000
committerChris Little <chrislit@crosswire.org>2013-01-04 13:45:54 +0000
commit614c5d52410650a4439b8215432f112284ff4bc7 (patch)
tree6d9eb027a09bcc655b4b4c925252e72f2ca9b9a0
parentbd35ecbaf2bdc791d3e73734316754b6b7ed8fa5 (diff)
downloadsword-tools-614c5d52410650a4439b8215432f112284ff4bc7.tar.gz
strip BOM, if present in USFM
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@410 07627401-56e2-0310-80f4-f8cd0041bdcd
-rwxr-xr-xmodules/python/usfm2osis.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/python/usfm2osis.py b/modules/python/usfm2osis.py
index 8d30b14..96cc6a5 100755
--- a/modules/python/usfm2osis.py
+++ b/modules/python/usfm2osis.py
@@ -1312,6 +1312,8 @@ def convertToOsis(sFile):
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)