From c9672b6a9db1a15dc723d3a14ca330c54bc4d78b Mon Sep 17 00:00:00 2001 From: artemp Date: Mon, 5 Jan 2015 12:39:56 +0100 Subject: [PATCH] escaped_string - fix output encoding --- .../json/properties_generator_grammar_impl.hpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/include/mapnik/json/properties_generator_grammar_impl.hpp b/include/mapnik/json/properties_generator_grammar_impl.hpp index 8171284c8..85ab1bf97 100644 --- a/include/mapnik/json/properties_generator_grammar_impl.hpp +++ b/include/mapnik/json/properties_generator_grammar_impl.hpp @@ -33,24 +33,19 @@ escaped_string::escaped_string() { karma::lit_type lit; karma::_r1_type _r1; - karma::hex_type hex; - karma::right_align_type right_align; - karma::print_type kprint; - + karma::char_type char_; esc_char.add - ('"', "\\\"") - ('\\', "\\\\") + ('\a', "\\a") ('\b', "\\b") ('\f', "\\f") ('\n', "\\n") ('\r', "\\r") ('\t', "\\t") + ('\v', "\\v") + ('"', "\\\"") ; - - esc_str = lit(_r1) - << *(esc_char - | kprint - | "\\u" << right_align(4,lit('0'))[hex]) + esc_str = lit(_r1) + << *(esc_char | char_) << lit(_r1) ; }