[sword-devel] BUG: VerseKey::setLocale doesn't work properly
Troy A. Griffitts
sword-devel@crosswire.org
Mon, 04 Mar 2002 18:23:19 -0700
Joachim,
Think I fixed this one. Seems VerseKey::clone didn't grab the locale
of the src VerseKey. Also, ParseVerseList didn't use clone :) Let me
know if it works in your real app now.
-Troy.
Joachim Ansorg wrote:
>
> Hi!
>
> While working on BibleTime's verse parsing I noticed some bad behaviour of
> VerseKey::setLocale.
> Have a look at this piece of code:
>
> VerseKey bla;
> bla = "James 1:19";
>
> bla.setLocale("de");
> cout << bla << endl;
> bla = "Johannes 1:1";
> cout << bla << endl;
>
> The output of this is:
>
> Jakobus 1:19
> Offenbarung 22:21
>
> The first one (Jakobus 1:1, which is James 1:19 in english) is correct. But
> if I equate the VerseKey object after changing the locale with a german book
> name (Johannes 1:1, which is John 1:1 in english) is returns all the time
> Revelation 22:21.
>
> Am I doing something wrong or is it a bug?
>
> Thank you very much for your support!
> Joachim