Fixed Kanji encoding in some specific cases
The mb_detect_encoding can return false and we have to handle this situation. Fixes #11786 Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
parent
1abdeb5741
commit
6652ed59e7
@ -8,6 +8,7 @@ phpMyAdmin - ChangeLog
|
||||
- issue #11783 Avoid syntax error in javascript messages on invalid PHP setting for max_input_vars
|
||||
- issue #11784 Properly handle errors in upacking zip archive
|
||||
- issue #11785 Set PHP's internal encoding to UTF-8
|
||||
- issue #11786 Fixed Kanji encoding in some specific cases
|
||||
|
||||
4.5.3.1 (2015-12-25)
|
||||
- issue #11774 Undefined offset 2
|
||||
|
||||
@ -82,6 +82,9 @@ function PMA_Kanji_strConv($str, $enc, $kana)
|
||||
return $str;
|
||||
}
|
||||
$string_encoding = mb_detect_encoding($str, $kanji_encoding_list);
|
||||
if ($string_encoding === false) {
|
||||
$string_encoding = 'utf-8';
|
||||
}
|
||||
|
||||
if ($kana == 'kana') {
|
||||
$dist = mb_convert_kana($str, 'KV', $string_encoding);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user