diff --git a/src/google/protobuf/compiler/php/php_generator.cc b/src/google/protobuf/compiler/php/php_generator.cc index 23621a48cf..6c00ea5af3 100644 --- a/src/google/protobuf/compiler/php/php_generator.cc +++ b/src/google/protobuf/compiler/php/php_generator.cc @@ -512,7 +512,7 @@ std::string BinaryToPhpString(const std::string& src) { if (src[i] == '\\' || src[i] == '$' || src[i] == '"') { dest += '\\'; dest += src[i]; - } else if (std::isprint(src[i])) { + } else if (absl::ascii_isprint(src[i])) { dest += src[i]; } else { dest += '\\';