[Boost-bugs] [Boost C++ Libraries] #5009: read_info doesn't handle wistream correctly (isspace asserts)

Subject: [Boost-bugs] [Boost C++ Libraries] #5009: read_info doesn't handle wistream correctly (isspace asserts)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-12-21 15:31:18


#5009: read_info doesn't handle wistream correctly (isspace asserts)
------------------------------+---------------------------------------------
 Reporter: v.pruess | Owner: cornedbee
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: property_tree
  Version: Boost 1.41.0 | Severity: Regression
 Keywords: |
------------------------------+---------------------------------------------
 The following code works on GNU/Linux (g++ 4.2.4) but fails on Windows
 (XP/vc8) because the library function ''isspace'' called by the info-
 parser seems to include an additional check (i <= 255).

 {{{

 using namespace boost::property_tree ;
 wptree pt ;

 std::wfstream fs( "any_utf8_encoded_file.info" ) ;
 fs.imbue( std::locale( std::locale(), new boost::utf8_codecvt_facet ) );

 read_info( fs, pt ) ;
 }}}

 I replaced the call to the single-argument-version of ''isspace'' with the
 locale-aware version which results in a running solution but in
 consequence nearly every method in info_parser_read.hpp got as an
 additional parameter a reference to the stream. Maybe there is a more
 elegant solution.

 See also comments in ''boost/tuple/tuple_io.hpp''.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5009>
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:05 UTC