diff options
author | Chris Little <chrislit@crosswire.org> | 2013-05-11 16:47:52 +0000 |
---|---|---|
committer | Chris Little <chrislit@crosswire.org> | 2013-05-11 16:47:52 +0000 |
commit | 1c5530cef4f8f572cedaeea2f360fc001bf07915 (patch) | |
tree | 0bf71817647f346850ba9d414988106641031694 /modules/python | |
parent | 5f83345ea8dede7fa64ef1d1888001c853c87371 (diff) | |
download | sword-tools-1c5530cef4f8f572cedaeea2f360fc001bf07915.tar.gz |
fixed Python3 compatability
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@415 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'modules/python')
-rwxr-xr-x | modules/python/usfm2osis.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/python/usfm2osis.py b/modules/python/usfm2osis.py index 96cc6a5..7e6d691 100755 --- a/modules/python/usfm2osis.py +++ b/modules/python/usfm2osis.py @@ -1312,7 +1312,10 @@ def convertToOsis(sFile): 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) |