Skip to content

Commit a72484b

Browse files
committed
[core:init] check is supported 'eucJP-win' on PHP
1 parent b25ab06 commit a72484b

File tree

1 file changed

+1
-1
lines changed
  • xoops_trust_path/modules/xpwiki/class/include

1 file changed

+1
-1
lines changed

xoops_trust_path/modules/xpwiki/class/include/init.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
$const['CONTENT_CHARSET'] = $this->get_content_charset();
5959

6060
// Internal content encoding (for mbstring extension)
61-
$const['SOURCE_ENCODING'] = (strtoupper($const['CONTENT_CHARSET']) === 'EUC-JP')? 'eucJP-win' : $const['CONTENT_CHARSET'];
61+
$const['SOURCE_ENCODING'] = (strtoupper($const['CONTENT_CHARSET']) === 'EUC-JP' && in_array('eucJP-win', mb_list_encodings()))? 'eucJP-win' : $const['CONTENT_CHARSET'];
6262

6363
// Is this site UTF-8?
6464
$const['FILE_ENCORD_EXT'] = ($const['CONTENT_CHARSET'] === 'UTF-8')? '_utf8' : '';

0 commit comments

Comments
 (0)