Labels: Type-Defect Priority-Medium
New issue 196 by ken.fukushima: Python: Ascii output is not assured to be
What steps will reproduce the problem?
1. In Python, set to a string field a unicode value that incudes not ascii
2. Dump the value using text_format.PrintMessage
3. Parse it to a new protocol buffer using text_format.Merge
4. _Tokenizer.ConsumeString fails with UnicodeDecodeError.
What is the expected output? What do you see instead?
The library should be able to understand a message it output.
What version of the product are you using? On what operating system?
Please provide any additional information below.
The problem is that text_format.PrintMessage outputs a unicode value as is
without encoding it
in utf-8. text_format.Merge assumes its input is encoded in utf-8.
You received this message because you are subscribed to the Google Groups "Protocol
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to
For more options, visit this group at