Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74292 - trunk/boost/spirit/home/support
From: joel_at_[hidden]
Date: 2011-09-07 00:02:33


Author: djowel
Date: 2011-09-07 00:02:33 EDT (Wed, 07 Sep 2011)
New Revision: 74292
URL: http://svn.boost.org/trac/boost/changeset/74292

Log:
Applied patch (ticket 5716)
https://svn.boost.org/trac/boost/attachment/ticket/5716/spirit_wide_what.patch
Text files modified:
   trunk/boost/spirit/home/support/info.hpp | 10 ++++++++--
   1 files changed, 8 insertions(+), 2 deletions(-)

Modified: trunk/boost/spirit/home/support/info.hpp
==============================================================================
--- trunk/boost/spirit/home/support/info.hpp (original)
+++ trunk/boost/spirit/home/support/info.hpp 2011-09-07 00:02:33 EDT (Wed, 07 Sep 2011)
@@ -15,6 +15,7 @@
 #include <boost/variant/recursive_variant.hpp>
 #include <boost/variant/apply_visitor.hpp>
 #include <boost/foreach.hpp>
+#include <boost/locale/encoding_utf.hpp>
 #include <boost/spirit/home/support/utf8.hpp>
 #include <list>
 #include <iterator>
@@ -127,6 +128,7 @@
     struct simple_printer
     {
         typedef utf8_string string;
+ typedef typename Out::char_type char_type;
 
         simple_printer(Out& out)
           : out(out) {}
@@ -134,9 +136,13 @@
         void element(string const& tag, string const& value, int /*depth*/) const
         {
             if (value == "")
- out << '<' << tag << '>';
+ out << char_type('<')
+ << locale::conv::utf_to_utf<char_type>(tag)
+ << char_type('>');
             else
- out << '"' << value << '"';
+ out << char_type('"')
+ << locale::conv::utf_to_utf<char_type>(value)
+ << char_type('"');
         }
 
         Out& out;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk