[sword-devel] ICU update

Daniel Glassey sword-devel@crosswire.org
Wed, 17 Jul 2002 01:12:04 +0100


well, I've just checked in my ICU work and it seems to work, or at least the 
current version of tlitmgrtest works, and I've integrated the work from that 
into the lib but it still needs tested.

For the frontend, all you need to know
SWMgr has a static bool isICU that lets you know at runtime if ICU has been 
enabled in sword
ICU SWMgr now loads a UTF8Transliterator filter as a global filter by default
- a comment in the code says that it wants to be handled differently but I 
can't see BibleCS doing that
(talking of which if this default stays biblecsmgr.cpp will need to be 
updated).

Transliteration is the conversion of text from one alphabetic script to 
another generally to try and make the text pronouncable if not 
understandable. e.g. logos is the greek for word transliterated into roman 
script.

for anyone interested in stuff below the hood:
the filter on construction loads the list of what sword transliterators are 
available from data into a map
then when the filter finds it needs to use one it asks ICU if one has already 
been created, if so it uses it.
otherwise it will use the stored info to load the transliteration rules from 
the data file and create a transliterator from that. then it passes it onto 
ICU to manage so next time it'll just be there.

sbedtime now, but I've just thought, we ought to make the SWTransMap static 
and make sure that Load() only gets done once.

also need to do a few things to autotool system like set sword icu data 
directory (defaults currently to /usr/local/lib/sword)

Let me know if theres anything more I can say.
Regards,
Daniel