From 62c066f918180c5b67e3e95db964cf7edcbe80f5 Mon Sep 17 00:00:00 2001 From: kmorimatsu Date: Tue, 16 Dec 2008 01:12:56 +0000 Subject: [PATCH] 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 --- nucleus/libs/globalfunctions.php | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- 2.11.0