[Boost-bugs] [Boost C++ Libraries] #1446: POSIX API doesn't use C locale

Subject: [Boost-bugs] [Boost C++ Libraries] #1446: POSIX API doesn't use C locale
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-11-16 12:57:32


#1446: POSIX API doesn't use C locale
-----------------------------------+----------------------------------------
 Reporter: tomaz.solc_at_[hidden] | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: regex
  Version: Boost 1.34.1 | Severity: Problem
 Keywords: |
-----------------------------------+----------------------------------------
 When using POSIX interface to boost::wregex [[:alpha:]] character class
 doesn't match non-ASCII alphabetical characters (eventhough C library's
 iswalpha() function correctly recognizes them).

 The attached program returns

 1
 0

 1
 1

 0
 1

 on Debian GNU/Linux ("Testing", Boost version 1.33.1). Changing:

 setlocale(LC_ALL, "en_US.utf8");

 to:

 std::locale en("en_US.utf8");
 std::locale::global(en);

 fixes the problem.

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1446>
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:49:57 UTC