Update PHP-gettext to 1.0.11
This commit is contained in:
parent
76e99e1e88
commit
2301fd651b
@ -174,13 +174,14 @@ function _get_codeset($domain=null) {
|
||||
* Convert the given string to the encoding set by bind_textdomain_codeset.
|
||||
*/
|
||||
function _encode($text) {
|
||||
$target_encoding = _get_codeset();
|
||||
if (function_exists("mb_detect_encoding")) {
|
||||
$source_encoding = mb_detect_encoding($text);
|
||||
if ($source_encoding != $target_encoding)
|
||||
$text = mb_convert_encoding($text, $target_encoding, $source_encoding);
|
||||
}
|
||||
return $text;
|
||||
$target_encoding = _get_codeset();
|
||||
if ($source_encoding != $target_encoding) {
|
||||
return mb_convert_encoding($text, $target_encoding, $source_encoding);
|
||||
}
|
||||
else {
|
||||
return $text;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user