Hi there !

Playing with the python3 Sword module I hit a problem that I did not
have with python2 when dealing with Strongs definition such as G1140
(daimonion). It looks like the 'æ' character is causing problem.

This example works with python2, but generate an error when ran wiht python3:

##########
import Sword
library = Sword.SWMgr()
target=library.getModule("StrongsGreek")
vk=Sword.SWKey("1140")
target.setKey(vk)
strongEntry=target.renderText().getRawData()
###########

  File "/usr/local/sword/python3/lib64/python3.4/site-packages/Sword.py",
line 128, in getRawData
    def getRawData(self): return _Sword.SWBuf_getRawData(self)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe6 in position
73: invalid continuation byte

Anyone knows how to be able to catch the content of this entry in a
python variable ?

_______________________________________________
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Reply via email to