Ticket #5716: spirit_wide_what.patch
File spirit_wide_what.patch, 1.2 KB (added by , 11 years ago) |
---|
-
boost/spirit/home/support/info.hpp
15 15 #include <boost/variant/recursive_variant.hpp> 16 16 #include <boost/variant/apply_visitor.hpp> 17 17 #include <boost/foreach.hpp> 18 #include <boost/locale/encoding_utf.hpp> 18 19 #include <boost/spirit/home/support/utf8.hpp> 19 20 #include <list> 20 21 #include <iterator> … … 127 128 struct simple_printer 128 129 { 129 130 typedef utf8_string string; 131 typedef typename Out::char_type char_type; 130 132 131 133 simple_printer(Out& out) 132 134 : out(out) {} … … 134 136 void element(string const& tag, string const& value, int /*depth*/) const 135 137 { 136 138 if (value == "") 137 out << '<' << tag << '>'; 139 out << char_type('<') 140 << locale::conv::utf_to_utf<char_type>(tag) 141 << char_type('>'); 138 142 else 139 out << '"' << value << '"'; 143 out << char_type('"') 144 << locale::conv::utf_to_utf<char_type>(value) 145 << char_type('"'); 140 146 } 141 147 142 148 Out& out;