diff --git a/src/parser/diff/ArcanistDiffParser.php b/src/parser/diff/ArcanistDiffParser.php index f7fece8f..28a7dd83 100644 --- a/src/parser/diff/ArcanistDiffParser.php +++ b/src/parser/diff/ArcanistDiffParser.php @@ -751,7 +751,7 @@ class ArcanistDiffParser { $is_binary = false; if ($this->detectBinaryFiles) { - $is_binary = preg_match('/([^\x09\x0A\x20-\x7E]+)/', $corpus); + $is_binary = !phutil_is_utf8($corpus); } if ($is_binary) {