1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-15 23:45:55 +00:00

lib: Upgrade php-gettext from 1.0.11 to 1.0.12

https://launchpad.net/php-gettext

The local change to rename the gettext_reader function to
__construct (commit 00b6b66827) has been
preserved.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg
2017-01-20 14:49:24 -05:00
parent e3cfa33ba9
commit 526096f06a
2 changed files with 10 additions and 7 deletions

View File

@@ -174,14 +174,13 @@ 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);
$target_encoding = _get_codeset();
if ($source_encoding != $target_encoding) {
return mb_convert_encoding($text, $target_encoding, $source_encoding);
}
else {
return $text;
}
if ($source_encoding != $target_encoding)
$text = mb_convert_encoding($text, $target_encoding, $source_encoding);
}
return $text;
}