bug #4207 json_encode error due to strftime returning non utf8 chars in Windows 8.1 Chinese version
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
This commit is contained in:
parent
fe3a103767
commit
0f3840138f
@ -3,6 +3,7 @@ phpMyAdmin - ChangeLog
|
||||
|
||||
4.4.3.0 (not yet released)
|
||||
- bug #4851 PHP errors in login dialogue
|
||||
- bug #4207 json_encode error due to strftime returning non utf8 chars in Windows 8.1 Chinese version
|
||||
|
||||
4.4.2.0 (2015-04-13)
|
||||
- bug #4835 PMA_hideShowConnection not called after submit_num_fields
|
||||
|
||||
@ -1610,7 +1610,14 @@ class PMA_Util
|
||||
$date
|
||||
);
|
||||
|
||||
return strftime($date, $timestamp);
|
||||
$ret = strftime($date, $timestamp);
|
||||
// Some OSes such as Win8.1 Traditional Chinese version did not produce UTF-8
|
||||
// output here. See https://sourceforge.net/p/phpmyadmin/bugs/4207/
|
||||
if (mb_detect_encoding($ret, 'UTF-8', true) != 'UTF-8') {
|
||||
$ret = date('Y-m-d H:i:s', $timestamp);
|
||||
}
|
||||
|
||||
return $ret;
|
||||
} // end of the 'localisedDate()' function
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user