Skip to content

Commit

Permalink
Get rid of iconv - issue-99.
Browse files Browse the repository at this point in the history
It does not work in some implementations and seems has no effect remove_accents() in WP Core.
  • Loading branch information
kagg-design committed Jul 19, 2021
1 parent 674d038 commit 8ced957
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/php/class-main.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,15 +332,8 @@ public function transliterate( $string ) {

$string = $this->fix_mac_string( $string );
$string = $this->split_chinese_string( $string, $table );
$string = strtr( $string, $table );

if ( function_exists( 'iconv' ) ) {
$new_string = iconv( 'UTF-8', 'UTF-8//TRANSLIT//IGNORE', $string );

return $new_string ?: $string;
}

return $string;
return strtr( $string, $table );
}

/**
Expand Down

0 comments on commit 8ced957

Please sign in to comment.