C++ interface (serializeToString) to protobuf always returns true

149 views
Skip to first unread message

DJ

unread,
Dec 2, 2013, 9:11:27 PM12/2/13
to prot...@googlegroups.com
Hi,

The interface I'm talking about is MessageLite::SerializeToString[1]. If you follow along the source code[2] for that function, you'll find that it eventually ends up calling MessageLite::AppendPartialToString and that function always returns "true". So, how is the consumer supposed to find out that the stream has invalid UTF-8 characters? Do I need to validate each string before I pack it into a protobuf?

DJ

Reply all
Reply to author
Forward
0 new messages