Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
refactor(encoding): Check if strings are valid for the specified enco…
…ding

Signed-off-by: Git'Fellow <[email protected]>
  • Loading branch information
solracsf authored Jan 29, 2025
commit f3b4fdccd0b538a161729a3dd990ffc0a2573561
2 changes: 1 addition & 1 deletion lib/private/Files/Storage/Wrapper/Encoding.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

/**
Expand Down
Loading