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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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?