[pyicu-dev] how does one use a .nrm file ?
Steven R. Loomis
srl at icu-project.org
Mon Apr 19 17:38:41 PDT 2010
- you might ask on icu-support as it is an ICU API issue
- the normalizer2 docs
specify that type of usage, which is part of ICU's normal data
- you might file a bug if the ICU documentation was not clear.
Andi Vajda wrote:
> On Mon, 19 Apr 2010, Andi Vajda wrote:
>> I have a file called utr30.nrm that was produced by ICU 4.4's gennorm2 on a
>> big endian ultra60 workstation.
>> I then put this file into a .dat file via:
>> $ echo utr30.nrm | gencmn -v -n utr30 0
>> I then use udata_setAppData("utr30", "utr30.dat") which appears to succeed.
>> How do I use that app data then with Normalizer2's getInstance() method ?
>> What are the packageName and name parameters supposed to be then ?
> After much poking around, reverse engineering, looking at ICU's Makefiles,
> I found that the following works:
> $ echo utr30.nrm | gencmn -v -n utr30 0 # big endian since utr30.nrm is
> $ icupkg -tl utr30.dat ../utr30.dat # convert to little endian
> then in Python, using the newest, little endian, utr30.dat if you are
> on a little endian platform
> >>> ResourceBundle.setAppData("utr30", "utr30.dat")
> >>> Normalizer2.getInstance("utr30", "utr30", UNormalizationMode2.COMPOSE)
> I'm not sure that this is the best way but it seems to work.
> pyicu-dev mailing list
> pyicu-dev at osafoundation.org
Steven R. Loomis srl at icu-project.org
Technical Lead, ICU for C/C++ <http://icu-project.org>
IBM San José Globalization Center of Competency
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pyicu-dev