Hello,
(I submitted this already via the protobuf google group web form, but
I think I screwed up. If not, sorry for the double post)
I have a C++-based server using protocol buffers as the IDL, and I'm
trying to ensure that it rejects invalid UTF-8 strings. My systest
library is written in
If you compile with the macro GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
defined, the C++ code will do UTF8 validation. However, it doesn't prevent
the data from serializing or parsing, it will simply log an error message.
How would you like it to fail?
On Mon, May 17, 2010 at 3:15 PM, JT Olds
Okay, well it's slightly more complicated. My C++ application needs to
actually accept the technically invalid code points U+ and U+FFFE.
Otherwise, I need my server application to know when invalid UTF-8 has
happened. That's all fine. I have that all implemented. That's good.
The problem is
It looks like I figured out a solution, though I'm not sure this is
the best way.
I have:
pbuf = MyProtoBuf()
pbuf.string_field = # to make sure pbuf initialization stuff
works (sets _has_string_field, etc)
pbuf._value_string_field = bad utf8
f =