Skip to content

Commit

Permalink
Moved the bad utf8 handling of gettext_pp before sprintf (Mithaldu++)
Browse files Browse the repository at this point in the history
  • Loading branch information
Getty committed Jan 22, 2013
1 parent 2984305 commit b4a2839
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/Locale/Simple.pm
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -101,10 +101,11 @@ sub ldnp {
} }
$return = sprintf($idp && $n != 1 ? $idp : $id, @args); $return = sprintf($idp && $n != 1 ? $idp : $id, @args);
} else { } else {
$return = sprintf(dnpgettext($td, $ctxt, $id, $idp, $n),@args); my $gt = dnpgettext($td, $ctxt, $id, $idp, $n);
# Fixing bad utf8 handling
utf8::decode($gt);
$return = sprintf($gt,@args);
} }
# Fixing bad utf8 handling
utf8::decode($return);
return $return; return $return;
} }


Expand Down

0 comments on commit b4a2839

Please sign in to comment.