Skip to content

Commit 9e781c0

Browse files
committed
wip
1 parent e9ddfa6 commit 9e781c0

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/Utils/Strings.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,8 @@ public static function toAscii(string $s): string
163163
// temporarily hide these characters to distinguish them from the garbage that iconv creates
164164
$s = strtr($s, '?', "\x01");
165165
$s = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $s);
166-
// remove garbage that iconv creates during transliteration
167-
$s = str_replace(['`', "'", '"', '^', '~', '?'], '', $s);
168-
// restore temporarily hidden characters
169-
$s = strtr($s, "\x01", '?');
166+
// remove garbage that iconv creates during transliteration and restore temporarily hidden characters
167+
$s = str_replace(['?', "\x01"], ['', '?'], $s);
170168
} else {
171169
$s = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $s);
172170
}

0 commit comments

Comments
 (0)