Skip to content

Commit

Permalink
Replace deprecated utf8_decode
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbertsoft committed Apr 26, 2023
1 parent e829bcd commit c83f729
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"ext-ctype": "*",
"ext-iconv": "*",
"ext-json": "*",
"ext-mbstring": "*",
"ext-sqlite3": "*",
"ext-zip": "*",
"ext-zlib": "*",
Expand Down
3 changes: 2 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Utility/StringUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public static function convertUmlauts(string $string): string
public static function toASCII(string $string): string
{
return strtr(
utf8_decode($string),
utf8_decode('ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ'),
mb_convert_encoding($string, 'ISO-8859-1', 'UTF-8'),
mb_convert_encoding('ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ', 'ISO-8859-1', 'UTF-8'),
'SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy'
);
}
Expand Down

0 comments on commit c83f729

Please sign in to comment.