avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Nip <p...@yahoo-inc.com>
Subject Why do JsonGenerator encodeBinary as unicode string?
Date Sat, 27 Sep 2014 03:00:15 GMT
Hi


I am wondering why avro-cpp JsonGenerator encodeBinary encode every byte as unicode?


    132 class AVRO_DECL JsonGenerator {

    157

    158     void escapeCtl(char c) {

    159         out_.write('\\');

    160         out_.write('U');

    161         out_.write('0');

    162         out_.write('0');

    163         out_.write(toHex((static_cast<unsigned char>(c)) / 16));

    164         out_.write(toHex((static_cast<unsigned char>(c)) % 16));

    165     }

Mime
View raw message