Status: New
Labels: Type-Defect Priority-Medium

New issue 196 by ken.fukushima: Python: Ascii output is not assured to be in utf-8

What steps will reproduce the problem?
1. In Python, set to a string field a unicode value that incudes not ascii chars
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 
Buffers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to