Subject: [Boost-bugs] [Boost C++ Libraries] #11524: regex [[:unicode:]] not matching the character u+100
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-08-04 22:29:32
#11524: regex [[:unicode:]] not matching the character u+100
------------------------------+-------------------------
Reporter: loli44fr@⦠| Owner: johnmaddock
Type: Bugs | Status: new
Milestone: To Be Determined | Component: regex
Version: Boost 1.58.0 | Severity: Problem
Keywords: |
------------------------------+-------------------------
{{{
The character u+100 is not found using the regex pattern[[:unicode:]].
Here sample :
#include <boost/regex.hpp>
#include <iostream>
using namespace std;
using namespace boost;
int main()
{
wregex re(L"[[:unicode:]]");
wstring wstr=L"\u0100";
if(regex_match(wstr,re))
cout<<"Match "<<endl;
else
{
cout<<"Not match"<<endl;
}
return 0;
}
'Not match' is displayed.
Proposed fix :
--- boost_1_58_0\boost\regex\v4\regex_traits_defaults.hpp Sat Feb 14
15:22:25 2015
+++ boost_1_58_0new\boost\regex\v4\regex_traits_defaults.hpp Tue Aug 04
21:20:38 2015
@@ -51,7 +51,7 @@
//
template <class charT>
inline bool is_extended(charT c)
-{ return c > 256; }
+{ return c > 255; }
inline bool is_extended(char)
{ return false; }
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11524> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC