Newbie -- Regex, Unicode, XCode and MacOSX

Hello. I'm trying to incorporate Unicode regex searching in a little
app I'm doing. I'm building using XCode 1.2 on MacOSX 10.3.4. The
problem I'm having is that I can't seem to get boost's regex to
incorporate unicode or wide-character support. In

Hello. I'm trying to incorporate Unicode regex searching in a little app I'm doing. I'm building using XCode 1.2 on MacOSX 10.3.4. The problem I'm having is that I can't seem to get boost's regex to incorporate unicode or wide-character support. In
there is the line #define BOOST_NO_CWCHAR which seems to disable allowance for unicode by causing boost::wregex and boost::wcmatch symbols to not be typedef-ed. A test app. shows that these symbols are defined when I build using Codewarrior. So I'm wondering how to get unicode support for regex using XCode (gcc) on a MacOSX machine. Any suggestions?
Are these symbols correctly defined? Can you comment them out and still get a clean compile? John.

Hello. I'm trying to incorporate Unicode regex searching in a little app I'm doing. I'm building using XCode 1.2 on MacOSX 10.3.4. The problem I'm having is that I can't seem to get boost's regex to incorporate unicode or wide-character support. In
there is the line #define BOOST_NO_CWCHAR which seems to disable allowance for unicode by causing boost::wregex and boost::wcmatch symbols to not be typedef-ed. A test app. shows that these symbols are defined when I build using Codewarrior. So I'm wondering how to get unicode support for regex using XCode (gcc) on a MacOSX machine. Any suggestions? Are these symbols correctly defined? I'm not exactly sure which symbols you're referring to, but... The BOOST_NO_CWCHAR is defined subsequent to a comment in macos.hpp which states: "// Using the Mac OS X system BSD-style C library" Thus, I'm not sure if BOOST_NO_CWCHAR is defined "correctly" since I'm not sure what the justification is based on the #define's preceding comment. As for the boost::wregex and boost::wcmatch symbols, if BOOST_NO_CWCHAR is defined, then BOOST_NO_WREGEX is subsequently defined, which results in
On Jul 21, 2004, at 4:33 AM, John Maddock wrote:
the typedefs for wcregex and wcmatch in
Can you comment them out and still get a clean compile? If I comment out the #define BOOST_NO_CWCHAR line regex compiles with no errors using the gcc.mak file in
directory.
I hope this helps. Thanks, Steve.

Are these symbols correctly defined? I'm not exactly sure which symbols you're referring to, but... The BOOST_NO_CWCHAR is defined subsequent to a comment in macos.hpp which states: "// Using the Mac OS X system BSD-style C library" Thus, I'm not sure if BOOST_NO_CWCHAR is defined "correctly" since I'm not sure what the justification is based on the #define's preceding comment.
I don't have access to that platform, so I just go what people tell me, BOOST_NO_CWCHAR should be defined only if the platform is missing a conforming version of the <cwchar> header.
As for the boost::wregex and boost::wcmatch symbols, if BOOST_NO_CWCHAR is defined, then BOOST_NO_WREGEX is subsequently defined, which results in the typedefs for wcregex and wcmatch in
being skipped, so these symbols are not defined (again, I'm not sure if this is "correct" behavior since I"m not sure of the reasoning behind the BOOST_NO_CWCHAR in the first place).
That's correct, if there is no <cwchar> header then regex can't provide wide character support.
Can you comment them out and still get a clean compile? If I comment out the #define BOOST_NO_CWCHAR line regex compiles with no errors using the gcc.mak file in
directory.
OK, so can you use wregex etc now? If not check to see if BOOST_NO_CWCTYPE or BOOST_NO_STD_WSTRING are defined, and if so comment out these defines as well... John.
participants (2)
-
John Maddock
-
Steve Moore