<ahref="unicode.html#boost_regex.unicode.rely_on_wchar_t">Rely on wchar_t</a>
</h5>
<p>
If your platform's <codeclass="computeroutput"><spanclass="keyword">wchar_t</span></code> type
can hold Unicode strings, and your platform's C/C++ runtime correctly handles
wide character constants (when passed to <codeclass="computeroutput"><spanclass="identifier">std</span><spanclass="special">::</span><spanclass="identifier">iswspace</span></code>
<codeclass="computeroutput"><spanclass="identifier">std</span><spanclass="special">::</span><spanclass="identifier">iswlower</span></code> etc), then you can use <codeclass="computeroutput"><spanclass="identifier">boost</span><spanclass="special">::</span><spanclass="identifier">wregex</span></code>
to process Unicode. However, there are several disadvantages to this approach:
</p>
<divclass="itemizedlist"><ultype="disc">
<li>
It's not portable: there's no guarantee on the width of <codeclass="computeroutput"><spanclass="keyword">wchar_t</span></code>,
or even whether the runtime treats wide characters as Unicode at all, most
Windows compilers do so, but many Unix systems do not.
</li>
<li>
There's no support for Unicode-specific character classes: <codeclass="computeroutput"><spanclass="special">[[:</span><spanclass="identifier">Nd</span><spanclass="special">:]]</span></code>,
<codeclass="computeroutput"><spanclass="special">[[:</span><spanclass="identifier">Po</span><spanclass="special">:]]</span></code> etc.
</li>
<li>
You can only search strings that are encoded as sequences of wide characters,
it is not possible to search UTF-8, or even UTF-16 on many platforms.
If you have the <ahref="http://www.ibm.com/software/globalization/icu/"target="_top">ICU
library</a>, then Boost.Regex can be <ahref="install.html#boost_regex.install.building_with_unicode_and_icu_support">configured
to make use of it</a>, and provide a distinct regular expression type (boost::u32regex),
that supports both Unicode specific character properties, and the searching
of text that is encoded in either UTF-8, UTF-16, or UTF-32. See: <ahref="ref/non_std_strings/icu.html"title="Working With Unicode and ICU String Types">ICU