michael@0: michael@0: michael@0:
michael@0: michael@0: michael@0: michael@0: michael@0:srtest is a little program that tests ScriptRun. You can use it as an michael@0: example of how to use ScriptRun. Here's what the output should look like: michael@0:
Script 'DEVANAGARI' michael@0: from 0 to 9. michael@0:michael@0: michael@0:
Script 'ARABIC' from michael@0: 9 to 17. michael@0:
Script 'CYRILLIC' from michael@0: 17 to 25. michael@0:
Script 'LATIN' from michael@0: 25 to 33. michael@0:
Script 'HAN' from 33 michael@0: to 35. michael@0:
Script 'HIRAGANA' from michael@0: 35 to 41. michael@0:
Script 'KATAKANA' from michael@0: 41 to 45. michael@0:
Script 'DESERET' from michael@0: 45 to 53.
On UNIX systems the simplest thing to do is to just copy scrptrun.h michael@0: and scrptrun.cpp into your source directory. If you want to use them from michael@0: <icu>/source/extra/scrpturn, it's a bit trickier: the default dependency michael@0: rules don't work on source files in a different directory. You need to michael@0: add separate dependency rules for scrptrun.o and scrptrun.d. See <icu>/source/samples/layout/Makefile.in michael@0: for an example of how to do this. You'll also have to add -I$(top_srcdir)/extra/scrptrun michael@0: to your compiler flags so that the compiler can find scrptrun.h. If your michael@0: application has to build on multiple UNIX platforms, it might be difficult michael@0: to wirte dependency rules that will work correctly on all platforms. In michael@0: that case, you're probably better off copying the scrpturn files to your michael@0: source directory. michael@0:
Building srtest is easy, on Windows build the srtest workspace in <icu>\source\extra\scrptrun. michael@0: On UNIX, connect to <top-build-dir>/extra/scrptrun and do "make all" michael@0: