[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


Hello,
 - you might ask on icu-support as it is an ICU API issue 
<http://site.icu-project.org/contacts>
 - the normalizer2 docs 
<http://icu-project.org/apiref/icu4c/classNormalizer2.html#a5f4be1fb35f18125aea3e3e83373a35f> 
specify that type of usage, which is part of ICU's normal data 
packaging/loading mechanism
 - you might file a bug if the ICU documentation was not clear.

Regards,
Steven

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.
>
> Andi..
> _______________________________________________
> pyicu-dev mailing list
> pyicu-dev at osafoundation.org
> http://lists.osafoundation.org/cgi-bin/mailman/listinfo/pyicu-dev
>   


-- 
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
<http://ibm.com/software/globalization>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osafoundation.org/pipermail/pyicu-dev/attachments/20100419/bdcdb573/attachment.htm 


More information about the pyicu-dev mailing list