Given a proto file:
syntax = "proto3";
package hello;
message TopGreeting {
NestedGreeting greeting = 1;
}
message NestedGreeting {
Greeting g
Answering my own question, I solved this issue by digging through Protobuf source code.
System.out.println(TextFormat.printer().escapingNonAscii(false).printToString(greeting))
Output:
greeting {
greeting {
message: "오늘은 무슨 요일입니까?"
}
}
toString
uses the same mechanism but with escapingNonAscii(true)
(default when omitted).
Also see this answer for how to convert Octal sequences to UTF-8 characters in case you don't have access to the source code, only logs.