[bt-devel] [ bibletime-Bugs-1805290 ] Keys of Hesychius (unicode keys in genbooks?) do not work
SourceForge.net
noreply at sourceforge.net
Thu Oct 25 12:31:02 MST 2007
Bugs item #1805290, was opened at 2007-09-30 22:55
Message generated for change (Comment added) made by mgruner
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100954&aid=1805290&group_id=954
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 8
Private: No
Submitted By: Eeli Kaikkonen (eelik)
>Assigned to: Eeli Kaikkonen (eelik)
Summary: Keys of Hesychius (unicode keys in genbooks?) do not work
Initial Comment:
Keys of the Hesychius lexicon (general book format) do not work. Why? In GnomeSword 2.2.0 they work fine. Can't BT handle unicode keys of genbooks or something like that?
(To reproduce just open the Hesychius module and see the keys.)
----------------------------------------------------------------------
>Comment By: Martin Gruner (mgruner)
Date: 2007-10-25 21:31
Message:
Logged In: YES
user_id=169722
Originator: NO
Eeli "the backend checker" fixed it! Hooray!
----------------------------------------------------------------------
Comment By: Eeli Kaikkonen (eelik)
Date: 2007-10-25 15:18
Message:
Logged In: YES
user_id=1031029
Originator: YES
I finally fixed this with a solution which I'm happy with.
TreeKeyIdx keystring getter methods of CSwordTreeKey should not be used
directly. Use the new getLocalNameUnicode() and old key() instead.
I also changed lexicon key because it potentially has the same problem. I
think that verse keys are a different case and I have not touched them.
Please test this carefully using all possible ways to change and view keys
of genbooks and lexicons. Try to find both utf8 and latin1 encoded modules.
It would be especially important to find a latin1 encoded lex/dict module
and test it in parallel view with a utf8 one (or we just have to hope that
all new modules will be utf8).
The German genbook module is buggy as Joachim told, it will not work
correctly.
----------------------------------------------------------------------
Comment By: Eeli Kaikkonen (eelik)
Date: 2007-10-24 20:23
Message:
Logged In: YES
user_id=1031029
Originator: YES
The fix is not adequate. This fixes only some locale. There is a German
genbook module (by Luther) and its keys do not work correctly. I really,
really hate the Sword library encoding issues and don't understand why
other encodings besides utf8 must be allowed. At least the library should
return only utf8 if the programmer-user so wants.
QString::fromLocal8Bit:
"QTextCodec::codecForLocale() is used to perform the conversion from
Unicode." It means that Ubuntu happens to have utf8 locale and therefore
Hesychius keys worked for me after the "fix".
I'm tired.
----------------------------------------------------------------------
Comment By: Eeli Kaikkonen (eelik)
Date: 2007-10-23 14:07
Message:
Logged In: YES
user_id=1031029
Originator: YES
Partial fix: CBookTreeChooser::TreeItem constructors:
setText(0, QString::fromLocal8Bit(m_key->getLocalName()) );
where fromLocal8Bit fixes the treechooser visible text. But selecting keys
do not still work.
I hate this kind of fixes where I don't understand how it works and why.
Can someone explain? Is this something which we should worry about with all
keychoosers? Do they all work with unicode key characters?
----------------------------------------------------------------------
Comment By: Martin Gruner (mgruner)
Date: 2007-10-21 18:40
Message:
Logged In: YES
user_id=169722
Originator: NO
Jeremy, is this something for you? Perhaps it will be useful to also apply
the fix to SVN of BibleTime for KDE4.
----------------------------------------------------------------------
Comment By: Martin Gruner (mgruner)
Date: 2007-10-21 18:39
Message:
Logged In: YES
user_id=169722
Originator: NO
Needs to be checked as well.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100954&aid=1805290&group_id=954
More information about the bt-devel
mailing list