[sword-devel] locale problem

Joachim Ansorg nospam+sword-devel at joachim-ansorg.de
Mon Jun 11 13:19:44 MST 2007


Hi,

> I'm having a problem in MacSword with locales.
>
> All bible book names that have german umlauts cannot be found and I
> get these errors:
>
> <error>
> VerseKey::Book: 1. Könige does not have a matching toupper abbrevs
> entry! book number returned was: -1(10). Required entry should be:
> 1. KöNIGE=11
> </error>

That probably means that the locale file is broken. Book names are compared in 
upper case, afair.
This shouldn't happen for German, though.

There are other locales for languages like Chinese. Using Unicode should solve 
all your troubles. To use Unicode with Sword's versekey you have to do a 
StringMgr implementation and set it at the very beginning of the startup 
using StringMgr::setSystemStringMgr
I attached BibleTime's impl so you know how it could look like.

If you set an Unicode aware impl the in- and output of VerseKey will be utf8  
encoded strings.

I'm just guessing, I havn't looked into any sources. Hopefully I'm right :)
Joachim
-- 
<>< Re: deemed
www.bibletime.info
-------------- next part --------------
A non-text attachment was scrubbed...
Name: btstringmgr.cpp.zip
Type: application/x-zip
Size: 1277 bytes
Desc: not available
Url : http://www.crosswire.org/pipermail/sword-devel/attachments/20070611/cacb7644/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: btstringmgr.h.zip
Type: application/x-zip
Size: 806 bytes
Desc: not available
Url : http://www.crosswire.org/pipermail/sword-devel/attachments/20070611/cacb7644/attachment-0001.bin 


More information about the sword-devel mailing list