avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r1698007 - in /avro/trunk: CHANGES.txt lang/c++/impl/json/JsonIO.hh
Date Wed, 26 Aug 2015 21:32:44 GMT
Author: blue
Date: Wed Aug 26 21:32:44 2015
New Revision: 1698007

URL: http://svn.apache.org/r1698007
Log:
AVRO-1593. Use classic locale to escape control chars. Contributed by Hatem Helal.

This closes #32 and closes #15.

Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/lang/c++/impl/json/JsonIO.hh

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1698007&r1=1698006&r2=1698007&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Wed Aug 26 21:32:44 2015
@@ -187,6 +187,9 @@ Avro 1.8.0 (10 August 2014)
     AVRO-1676. Java: Do not treat enum symbols as immutable when deep copying.
     (Mike Rodriguez via tomwhite)
 
+    AVRO-1593. C++: Use classic locale to escape control chars.
+    (Hatem Helal via blue)
+
 Avro 1.7.7 (23 July 2014)
 
   NEW FEATURES

Modified: avro/trunk/lang/c++/impl/json/JsonIO.hh
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c%2B%2B/impl/json/JsonIO.hh?rev=1698007&r1=1698006&r2=1698007&view=diff
==============================================================================
--- avro/trunk/lang/c++/impl/json/JsonIO.hh (original)
+++ avro/trunk/lang/c++/impl/json/JsonIO.hh Wed Aug 26 21:32:44 2015
@@ -19,6 +19,7 @@
 #ifndef avro_json_JsonIO_hh__
 #define avro_json_JsonIO_hh__
 
+#include <locale>
 #include <stack>
 #include <string>
 #include <sstream>
@@ -193,7 +194,7 @@ class AVRO_DECL JsonGenerator {
                 escape('t', b, p);
                 break;
             default:
-                if (! iscntrl(*p)) {
+                if (! std::iscntrl(*p, std::locale::classic())) {
                     continue;
                 }
                 write(b, p);



Mime
View raw message