[sword-devel] Unicode Bible program

Joel Mawhorter sword-devel@crosswire.org
Fri, 25 Feb 2000 15:28:31 -0800

> Paul Gear wrote:
> Some more comments (i am not an expert, but i've looked into it a little):
> - 7-bit ASCII is a subset of Unicode.  If you use UTF-8 encoding (not what Java uses,
> but what XML uses), then all of the 7-bit codes convert over directly.
> - Eventually all of Sword _must_ support Unicode, because that is the way the Web is
> going, given that XML is defined to be Unicode, and currently the best standards for
> text markup use it.
> Because of this, i believe that adding to Sword is the best option.  If
>Troy's Java bindings can be made to work, then there is no reason we can't
>use a Java frontend plugged into the Sword libraries.  (That would make me a
>much happier and more productive programmer, too.  :-) 

Thankfully, Java can read UTF-8 files without any add-ons (C++ however, can't).

>From what I got out of cvs, it looks like Troy was porting the actual Sword
library to Java not creating bindings (Is that right Troy?). I think the best
option would be to use the stuff that Troy has ported to Java and create a
completely Java version of Sword (library and frontend). This option has a few

1. The Unicode specific stuff wouldn't have to be implemented in C++ (as it
would if we just added to the current Sword lib). It would be a lot more work
to do in C++ than in Java and since all of the code that deals with strings
will have to be written from scratch, it might as well be done in Java.
2. The current Sword development could continue without getting side-tracked by
the changes that would be required for Unicode support.  
3. The end product would be two versions of Sword, one that could run on any
platform that supported Java and another that was fast and had support for OS
or GUI specific features through frontends like BibleTime. I think there is
need for both of those things.

I've been doing some playing around with Java to see if this is feasible and
easy. So far it looks like it would be very easy to support this kind of program
in Java. The only possible issue is speed. I'm going to play with it a bit more
to see if Java is fast enough. The Swing compontents I've been playing with
seem fairly responsive on my fairly slow Pentium 166. With well designed text
searching/indexing algorithms, I don't think that speed would be a problem.
I'll let you know what I discover when I've had a bit more time to experiment.

I'm going to be away at a Church retreat this weekend so I won't be replying to
any e-mail until Sunday or Monday.

In Christ,