From: George R. <gr...@us...> - 2003-03-21 21:27:32
|
You should realize that ICU doesn't reload the alias table. If the alias table has be used previously, ICU won't unload it. You need to set u_setDataDirectory() before using ICU. If you can't do that, you can use u_cleanup() to forceably unload the alias table and everything else, but you need to read the function's documentation. u_cleanup can be a dangerous function if you don't know what your doing. My general advice is if you don't need to use u_cleanup, don't use it. George Rhoten IBM Globalization Center of Competency/ICU San Jose, CA, USA kam...@as... Sent by: icu...@ww... 03/21/2003 10:07 AM To: sr...@jt... cc: icu...@ww... Subject: RE: Problem related to the ICU_DATA I made the changes to use u_setDataDirectory instead of using putenv for ICU_DATA, but, it makes no difference to my problem. It still listing only the maps build with icudata library not that are added afterwards. Once again, if I set ICU_DATA explicitly from the shell, it works fine. Thanks, Kamal -----Original Message----- From: sr...@jt... [mailto:sr...@jt...] Sent: Thursday, March 20, 2003 6:32 PM To: kam...@as... Cc: icu...@ww... Subject: Re: Problem related to the ICU_DATA Don't use putenv, use u_setDataDirectory(), before any other ICU functions are called. The list of mappings is only read once (unless all of ICU is shut down with u_cleanup() -s -steven On Thursday, March 20, 2003, at 02:13 PM, kam...@as... wrote: I am using ICU_DATA for fetching the custom added maps (together with the ICU's built-in maps) into the list through the APIs ucnv_countAvailable() & ucnv_getAvailableName(). Things are working fine if ICU_DATA is set externally (using "export") but, when I tried this with ICU_DATA set from within the code (using putenv), its not at all recognizing the newly added maps. I checked through "getenv" that ICU_DATA is properly set and its working fine if I tried to find some file at that location. I was able to update the alias file $ICU_DATA/convrtrs.txt (and then compile it with "gencnval") for the new maps (these also get compiled with "makeconv"). But, once I tried to extract this info through ucnv_countAvailable() & ucnv_getAvailableName(), it reporting only the already existing maps, not the newly added ones. Next, if I set the ICU_DATA at shell level, its providing me a complete listing; ICU's built-in + the custom added ones. Any hint will be a great help. |