
hi guys, I want to use boost::regex in Windows XP + VC6 to match Japanese . I want to know if I need to enable ICU when I compile boost_1_36_0. In my short test program, I did not enable icu and it still can mathch and replace Japanese. But I do not know it is always right. And if I want to match Japanese I mush enable ICU? Appreciate any help. Worldwind

On Mon, Dec 15, 2008 at 6:55 PM, wind world <worldwindjp@gmail.com> wrote:
hi guys, I want to use boost::regex in Windows XP + VC6 to match Japanese . I want to know if I need to enable ICU when I compile boost_1_36_0. In my short test program, I did not enable icu and it still can mathch and replace Japanese. But I do not know it is always right. And if I want to match Japanese I mush enable ICU? Appreciate any help. Worldwind
I use Boost.Regexwith ICU. I use both VC2k3 and VC2k5, I do have VC6 installed but I do not know it if can build ICU or anything (been a while since I have touched it), so I am assuming for the rest of this post it does. I 'think' (do not quote me on this) that it still supplies enough Unicode functionality without ICU to 'work' in most cases. If you do with to build with ICU, make sure the environment var HAVE_ICU=1 and ICU_PATH=R:\SDKs\icu\icu or wherever your path is, where ICU_PATH\include and ICU_PATH\lib are the appropriate directories. You can also pass those directly to bjam as -sHAVE_ICU and so forth if I remember correctly. Do note, if you compile and use an ICU that is version 3 or newer (which even now is pretty old), they build some libraries with different names then what Boost expects, I *think* those are: <new_version_lib_name> copy-and-name-to <old_version_lib_name> icuin.lib copy-and-name-to icui18n.lib icuind.lib copy-and-name-to icui18nd.lib And I think there was one more, but do not remember off-hand, if the compile fails a link, just look for a similar named file that looks 'obvious' as to what it should be and copy and rename it to what boost is wanting. Do note, even with ICU, there are some Japanese characters in Kanji that can be built using different Unicode chars, so different patterns give the same 'character', but will not match each other. ICU has things for testing such matches, but I am not sure Boost.Regex uses it (they are a bit convoluted and slow, so most things do not use them).

OvermindDL1 wrote:
Do note, if you compile and use an ICU that is version 3 or newer (which even now is pretty old), they build some libraries with different names then what Boost expects, I *think* those are: <new_version_lib_name> copy-and-name-to <old_version_lib_name> icuin.lib copy-and-name-to icui18n.lib icuind.lib copy-and-name-to icui18nd.lib And I think there was one more, but do not remember off-hand, if the compile fails a link, just look for a similar named file that looks 'obvious' as to what it should be and copy and rename it to what boost is wanting.
Build of Boost.Regex dll's works for me straight out of the box with Boost-1.37 and ICU-4.0 with VC8, what am I missing? John.

On Tue, Dec 16, 2008 at 3:05 AM, John Maddock <john@johnmaddock.co.uk> wrote:
OvermindDL1 wrote:
Do note, if you compile and use an ICU that is version 3 or newer (which even now is pretty old), they build some libraries with different names then what Boost expects, I *think* those are: <new_version_lib_name> copy-and-name-to <old_version_lib_name> icuin.lib copy-and-name-to icui18n.lib icuind.lib copy-and-name-to icui18nd.lib And I think there was one more, but do not remember off-hand, if the compile fails a link, just look for a similar named file that looks 'obvious' as to what it should be and copy and rename it to what boost is wanting.
Build of Boost.Regex dll's works for me straight out of the box with Boost-1.37 and ICU-4.0 with VC8, what am I missing?
Uncertain, but when I built ICU-4.0 a couple of the library names are different then what the boost bjam build wants (this is with boost 1.36, 1.37, and trunk). A simple copy and rename gets boost working though, just a bit odd.

OvermindDL1 wrote:
Uncertain, but when I built ICU-4.0 a couple of the library names are different then what the boost bjam build wants (this is with boost 1.36, 1.37, and trunk). A simple copy and rename gets boost working though, just a bit odd.
I didn't build ICU, just downloaded the binary package, the supplied library names were: icudt.lib icuin.lib icuio.lib icule.lib iculx.lib icutu.lub icuuc.lib Which match what the build script looks for. Confused yours, John.

On Wed, Dec 17, 2008 at 3:15 AM, John Maddock <john@johnmaddock.co.uk> wrote:
OvermindDL1 wrote:
Uncertain, but when I built ICU-4.0 a couple of the library names are different then what the boost bjam build wants (this is with boost 1.36, 1.37, and trunk). A simple copy and rename gets boost working though, just a bit odd.
I didn't build ICU, just downloaded the binary package, the supplied library names were:
icudt.lib icuin.lib icuio.lib icule.lib iculx.lib icutu.lub icuuc.lib
Which match what the build script looks for.
Those are the same library names that ICU built for me, but when I ran my Boost build bjam script (from trunk, about two weeks ago), that is certainly not the filenames it was looking for. I may get a chance this weekend to look at it and recompile it all to give it another try to verify if someone reminds me.

wind world wrote:
hi guys, I want to use boost::regex in Windows XP + VC6 to match Japanese . I want to know if I need to enable ICU when I compile boost_1_36_0. In my short test program, I did not enable icu and it still can mathch and replace Japanese. But I do not know it is always right. And if I want to match Japanese I mush enable ICU? Appreciate any help.
I believe you should probably be OK without it: by default boost::wregex will use the native Win32 locale functions, so as long as the Windows wide character API's support the Japanese locale then you will be fine. HTH, John.
participants (3)
-
John Maddock
-
OvermindDL1
-
wind world