|
Boost Users : |
Subject: Re: [Boost-users] something about icu
From: OvermindDL1 (overminddl1_at_[hidden])
Date: 2008-12-15 23:19:13
On Mon, Dec 15, 2008 at 6:55 PM, wind world <worldwindjp_at_[hidden]> 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).
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net