printing utf-8 string

9 views
Skip to first unread message

Dmitry Ermolov

unread,
Sep 30, 2009, 5:06:16 AM9/30/09
to Protocol Buffers
Hi all,

I use protocol bufferst to serialize some strings, which encoded in
UTF-8.
When I use the function Print from "text_format.h", I get strings
like:

UtfField: "\321\202\320\265\321\201\321\202"

Is there some way to pretty-print such string itself, but not a binary
representation?

Thank you!

--
Dmitry Ermolov

Kenton Varda

unread,
Sep 30, 2009, 3:50:59 PM9/30/09
to Dmitry Ermolov, Protocol Buffers
This has been discussed before but no one has gotten around to doing it.  I'd be happy to accept a patch which adds a method DontEscapeUtf8(bool) to TextFormat::Printer.  Of course, unprintable ASCII characters should still be escaped.
Reply all
Reply to author
Forward
0 new messages