Boost C++ Libraries: Ticket #7935: Exception if specify character range with certain code points (if collation used) https://svn.boost.org/trac10/ticket/7935 <p> If you try and compile the regex: </p> <pre class="wiki">[\x{0080}-\x{10C6}] </pre><p> the regex code will throw an exception if boost::regex::collate is specified. However, the expressions: </p> <pre class="wiki">[\x{0080}-\x{10C5}] </pre><p> or </p> <pre class="wiki">[\x{0080}-\x{10D0}] </pre><p> are just fine. I think the issue is related to 0x10C6 not being an assigned Unicode code point but I could be wrong. </p> <p> Sample code: </p> <pre class="wiki">boost::wregex regexText( L"[\\x{0080}-\\x{10C6}]", boost::regex::collate ); </pre><p> O/S: Win 7 (x64), Compiler: VS 2010 (SP1) </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7935 Trac 1.4.3 John Maddock Fri, 01 Feb 2013 13:33:21 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7935#comment:1 https://svn.boost.org/trac10/ticket/7935#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> I don't believe this is a bug - or at least not one that can be fixed. </p> <p> When the collate flag is set, the behavior is determined entirely by the underlying OS and what locale is in effect. If the underlying API's believe that the character 0x10D0 collates before 0x80 then the library is correct in saying that the range is invalid. In short the collate flag is only useful where the endpoints of the range come from the same block of characters in the current locate. </p> Ticket