Skip to content

Commit

Permalink
process IGNORE before TRANSLIT
Browse files Browse the repository at this point in the history
  • Loading branch information
ludekvesely committed May 30, 2016
1 parent b287e85 commit 246a751
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Iconv.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,22 +145,22 @@ public static function iconv($inCharset, $outCharset, $str)
$inCharset = 'iso-8859-1';
}

if ('//translit' === substr($outCharset, -10)) {
$translit = '//TRANSLIT';
$outCharset = substr($outCharset, 0, -10);
}

if ('//ignore' === substr($outCharset, -8)) {
$ignore = '//IGNORE';
$outCharset = substr($outCharset, 0, -8);
}

if ('//translit' === substr($inCharset, -10)) {
$inCharset = substr($inCharset, 0, -10);
if ('//translit' === substr($outCharset, -10)) {
$translit = '//TRANSLIT';
$outCharset = substr($outCharset, 0, -10);
}

if ('//ignore' === substr($inCharset, -8)) {
$inCharset = substr($inCharset, 0, -8);
}
if ('//translit' === substr($inCharset, -10)) {
$inCharset = substr($inCharset, 0, -10);
}

if (isset(self::$alias[ $inCharset])) {
$inCharset = self::$alias[ $inCharset];
Expand Down

0 comments on commit 246a751

Please sign in to comment.