kidok / protobuf

Automatically exported from code.google.com/p/protobuf
0 stars 0 forks source link

java: TextFormat.printToUnicodeString does not escape double quote #610

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
TextFormatter.printFieldValue(...) code is this:

===
...
        case STRING:
          generator.print("\"");
          generator.print(escapeNonAscii ?
              escapeText((String) value) :
              (String) value);
          generator.print("\"");
          break;
===

If escapeNonAscii is false, string is not escaped, double quote is output as 
is, resulting in invalid text protobuf.

Original issue reported on code.google.com by stepanc...@mx1.ru on 27 Feb 2014 at 8:44

GoogleCodeExporter commented 9 years ago
This bug is already fixed in our internal branch. Next release will fix this 
problem.

Original comment by xiaof...@google.com on 27 Feb 2014 at 10:22

GoogleCodeExporter commented 9 years ago

Original comment by jie...@google.com on 17 Jul 2014 at 11:09

GoogleCodeExporter commented 9 years ago

Original comment by jie...@google.com on 26 Aug 2014 at 3:26