From: kmorimatsu Date: Tue, 16 Dec 2008 01:12:56 +0000 (+0000) Subject: Shift_JIS support for mobile phone. X-Git-Tag: release-3-41@1002~94 X-Git-Url: http://git.osdn.net/view?p=nucleus-jp%2Fnucleus-jp-ancient.git;a=commitdiff_plain;h=62c066f918180c5b67e3e95db964cf7edcbe80f5 Shift_JIS support for mobile phone. git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk/utf8@728 1ca29b6e-896d-4ea0-84a5-967f57386b96 --- diff --git a/nucleus/libs/globalfunctions.php b/nucleus/libs/globalfunctions.php index 1f0e89f..bba7806 100755 --- a/nucleus/libs/globalfunctions.php +++ b/nucleus/libs/globalfunctions.php @@ -1542,6 +1542,12 @@ function encoding_check($val, $key, $encoding=false, $exclude=false) { $search='/^([\x00-\x7F]+'. '|[\xA1-\xF7][\xA1-\xFE])*/'; break; + case 'shift_jis': + // Note that shift_jis is only supported for output. + // Using shift_jis in DB is prohibited. + $search='/^([\x00-\x7F\xA1-\xDF]+'. + '|[\x81-\x9F\xE0-\xFC][\x40-\xFC])*/'; + break; default: $search=false; if (preg_match('/^iso\-8859\-[0-9]{1,2}$/',$encoding)) break;