[sword-devel] Fwd: Re: bibletime stuff

Joachim Ansorg sword-devel@crosswire.org
Tue, 27 Aug 2002 18:48:31 +0200


--------------Boundary-00=_VCHI4UTUBJ4VTPHMYLUZ
Content-Type: text/plain;
  charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable

This is a patch to make locales, which are currently not working work bet=
ter=20
(e.h. russian).

Troy, can you please review this and post your ok or criticism?

Joachim

----------  Forwarded Message  ----------

Subject: Re: bibletime stuff
Date: Sun, 25 Aug 2002 21:54:54 +0000
From: "John Being" <olonho@hotmail.com>
To: jansorg@gmx.de

> > Currently it doesn't work out of the box (for the same reasons as Heb=
rew
> > translation, and most other non-West Europian encodings), I would fix=
 it
>
>if
>
> > nobody else gonna do that.
>
>Does the attached file work better now? I hope it does, because on my bo=
x
>it
>works ok (choosing the books of the list in BibleTime works, at least I
>think
>it looks like russian :)

Well not for me - Sword gives bunch of messages like this:
Book: &#1048;&#1077;&#1088;&#1077;&#1084;&#1080;&#1103; does not have a
matching toupper abbrevs entry! book number returned was: -1
Book name is in Russian. I created dirty hack(see attachment) for Sword
that makes it working (but slows stuff down for affected locales).
Probably it should be in CVS until we'll get better uppercase logic.


  Nikolay.





_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

-------------------------------------------------------


--------------Boundary-00=_VCHI4UTUBJ4VTPHMYLUZ
Content-Type: application/octet-stream;
  charset="us-ascii";
  name="versekey.cpp.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="versekey.cpp.patch"

SW5kZXg6IHZlcnNla2V5LmNwcAo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ClJD
UyBmaWxlOiAvY3Zzcm9vdC9zd29yZC9zd29yZC9zcmMva2V5cy92ZXJzZWtl
eS5jcHAsdgpyZXRyaWV2aW5nIHJldmlzaW9uIDEuMgpkaWZmIC11IC0zIC1w
IC1yMS4yIHZlcnNla2V5LmNwcAotLS0g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