diff --git a/lib/private/Files/Storage/Wrapper/Encoding.php b/lib/private/Files/Storage/Wrapper/Encoding.php index 92e20cfb3df03..d6d32aaaf7f9e 100644 --- a/lib/private/Files/Storage/Wrapper/Encoding.php +++ b/lib/private/Files/Storage/Wrapper/Encoding.php @@ -37,7 +37,7 @@ public function __construct(array $parameters) { * Returns whether the given string is only made of ASCII characters */ private function isAscii(string $str): bool { - return !preg_match('/[\\x80-\\xff]+/', $str); + return mb_check_encoding($str, 'ASCII'); } /**