diff options
-rw-r--r-- | php/src/Google/Protobuf/Internal/GPBJsonWire.php | 2 | ||||
-rw-r--r-- | php/src/Google/Protobuf/Internal/Message.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/php/src/Google/Protobuf/Internal/GPBJsonWire.php b/php/src/Google/Protobuf/Internal/GPBJsonWire.php index 9ae57ab3..43f4745d 100644 --- a/php/src/Google/Protobuf/Internal/GPBJsonWire.php +++ b/php/src/Google/Protobuf/Internal/GPBJsonWire.php @@ -226,7 +226,7 @@ class GPBJsonWire $output->writeRaw("\"", 1); break; case GPBType::STRING: - $value = json_encode($value); + $value = json_encode($value, JSON_UNESCAPED_UNICODE); $output->writeRaw($value, strlen($value)); break; // case GPBType::GROUP: diff --git a/php/src/Google/Protobuf/Internal/Message.php b/php/src/Google/Protobuf/Internal/Message.php index 73ac375e..8ff141ca 100644 --- a/php/src/Google/Protobuf/Internal/Message.php +++ b/php/src/Google/Protobuf/Internal/Message.php @@ -1563,7 +1563,7 @@ class Message } break; case GPBType::STRING: - $value = json_encode($value); + $value = json_encode($value, JSON_UNESCAPED_UNICODE); $size += strlen($value); break; case GPBType::BYTES: |