From f1ee2c15177e8863369e0223edca1f6d1b34e0df Mon Sep 17 00:00:00 2001
From: sakamocchi
Date: Sat, 24 Mar 2012 10:58:21 +0900
Subject: [PATCH] =?utf8?q?FIX:=20=E5=86=86=E3=83=9E=E3=83=BC=E3=82=AF?=
=?utf8?q?=E3=82=92=E3=83=90=E3=83=83=E3=82=AF=E3=82=B9=E3=83=A9=E3=83=83?=
=?utf8?q?=E3=82=B7=E3=83=A5=E3=81=AB=E7=BD=AE=E6=8F=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
UTF-8/Shift_JISéã®å¤æãç¹°ãè¿ãããã以ä¸ãçºçãã¾ãããããã¯ãã®ä¿®æ£ã³ãããã§ãã
UTF-8ããShift_JIS: ããã¯ã¹ã©ãã·ã¥ã¯åãã¼ã¯ï¼0x5Cï¼ã¨ãã¦èªèããã
Shift_JISããUTF-8: åãã¼ã¯ã2ãã¤ãï¼0xC2A5ï¼ã«å¤æããã
èæ¯:
UTF-8ã®æåéåã§ããUCS-2ã¯ããã¯ã¹ã©ãã·ã¥ï¼backslashï¼ã¨åãã¼ã¯ï¼yen
signï¼ã®ããããã«ã³ã¼ããã¤ã³ããå²ãå½ã¦ãå¥ã
ã®ãã£ã©ã¯ã¿ã¼ã¨ãã¦æ±ãããã®ãããããã¯ãUTF-8ã«ããã¦ç°ãªããã¤ããªã¼ã¨ãªããåè
ã¯0x5Cã«ãå¾è
ã¯0xC2A5ã«ç¬¦å·åãããã
対ãã¦Shift_JISã®æåéåã®ã²ã¨ã¤ã§ããJIS X
0201ï¼è±æ°åã¨ç´ç©ãçä»®åãå«ãï¼ã¯ãããï¼ã¤ã®ãã¡åãã¼ã¯ããè¦å®ãã¦ããªãããã®ããShift_JISã¯ããã¯ã¹ã©ãã·ã¥ãæ±ããã¨ãã§ãããåãã¼ã¯ã0x5Cã«ç¬¦å·åããã
ãªãISO
8859ã·ãªã¼ãºã¯ãããããããã¯ã¹ã©ãã·ã¥ã¯ç¬¦å·å対象æååã«æã¤ãã®ã®ãåãã¼ã¯ã¯ä»¥ä¸ã®4ã¤ããæããªãããã®å ´åãããã¯ã¹ã©ãã·ã¥ã¯0x5Cã«ãåãã¼ã¯ã¯0xA5ã«ç¬¦å·åãããã
ISO-8859-1
ISO-8859-8
ISO-8859-9
ISO-8859-15
---
install/index.php | 104 +++++++++++++++++++++++++++---------------------------
1 file changed, 52 insertions(+), 52 deletions(-)
diff --git a/install/index.php b/install/index.php
index b5c4291..37a364b 100644
--- a/install/index.php
+++ b/install/index.php
@@ -243,7 +243,7 @@ function show_header()
{
echo ' class="gry"';
}
- echo '> > ', _STEP3, "Â¥n";
+ echo '> > ', _STEP3, "\n";
}
if ( in_array($param->state, array('mysql', 'weblog', 'detail')) )
{
@@ -290,7 +290,7 @@ function show_select_locale_form()
$languages = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
foreach ($languages as $language)
{
- $language = preg_replace('#([Â¥w]+).*#', '$1', $language);
+ $language = preg_replace('#([\w]+).*#', '$1', $language);
break;
}
@@ -310,12 +310,12 @@ function show_select_locale_form()
$locale[1]Â¥n";
+ echo ">$locale[1]\n";
}
?>
@@ -369,7 +369,7 @@ function show_database_setting_form($isPostback)
{
foreach ( $errors as $error )
{
- echo '', $error, "Â¥n";
+ echo '', $error, "\n";
}
}
}
@@ -431,7 +431,7 @@ function show_blog_setting_form($isPostback)
{
foreach ( $errors as $error )
{
- echo '', $error, "Â¥n";
+ echo '', $error, "\n";
}
}
}
@@ -460,7 +460,7 @@ function show_blog_setting_form($isPostback)
{
foreach ( $errors as $error )
{
- echo '', $error, "Â¥n";
+ echo '', $error, "\n";
}
}
}
@@ -513,7 +513,7 @@ function show_detail_setting_form($isPostback)
check_all_parameters() )
{
- echo '', _ERROR26, "Â¥n";
+ echo '', _ERROR26, "\n";
}
?>
@@ -541,7 +541,7 @@ function show_detail_setting_form($isPostback)
{
foreach ( $errors as $error )
{
- echo '', $error, "Â¥n";
+ echo '', $error, "\n";
}
}
}
@@ -580,7 +580,7 @@ function show_detail_setting_form($isPostback)
{
foreach ( $errors as $error )
{
- echo '', $error, "Â¥n";
+ echo '', $error, "\n";
}
}
$errors = $param->check_path_parameters();
@@ -588,7 +588,7 @@ function show_detail_setting_form($isPostback)
{
foreach ( $errors as $error )
{
- echo '', $error, "Â¥n";
+ echo '', $error, "\n";
}
}
}
@@ -647,7 +647,7 @@ function show_detail_setting_form($isPostback)
{
foreach ( $errors as $error )
{
- echo '', $error, "Â¥n";
+ echo '', $error, "\n";
}
}
}
@@ -687,7 +687,7 @@ function show_detail_setting_form($isPostback)
{
foreach ( $errors as $error )
{
- echo '', $error, "Â¥n";
+ echo '', $error, "\n";
}
}
}
@@ -733,7 +733,7 @@ function show_install_complete_form()
echo _ERROR27;
foreach ( $errors as $error )
{
- echo '', $error, "Â¥n";
+ echo '', $error, "\n";
}
}
else
@@ -900,11 +900,11 @@ function do_install()
$queries = fread($fd, filesize($filename) );
fclose($fd);
- $queries = preg_split('#(;Â¥n|;Â¥r)#', $queries);
+ $queries = preg_split('#(;\n|;\r)#', $queries);
foreach ( $queries as $query )
{
- if ( preg_match('/Â¥w+/', $query) )
+ if ( preg_match('/\w+/', $query) )
{
if ( $MYSQL_PREFIX )
{
@@ -1020,36 +1020,36 @@ function do_install()
/*
* 8. Write config file ourselves (if possible)
*/
- $config_data = '<' . '?php' . "Â¥n";
- $config_data .= "// mySQL connection information¥n";
- $config_data .= "Â¥$MYSQL_HOST = '" . $MYSQL_HOST . "';Â¥n";
- $config_data .= "Â¥$MYSQL_USER = '" . $MYSQL_USER . "';Â¥n";
- $config_data .= "Â¥$MYSQL_PASSWORD = '" . $MYSQL_PASSWORD . "';Â¥n";
- $config_data .= "Â¥$MYSQL_DATABASE = '" . $MYSQL_DATABASE . "';Â¥n";
- $config_data .= "Â¥$MYSQL_PREFIX = '" . $MYSQL_PREFIX . "';Â¥n";
- $config_data .= "// new in 3.50. first element is db handler, the second is the db driver used by the handler¥n";
- $config_data .= "// default is ¥$MYSQL_HANDLER = array('mysql','mysql');¥n";
- $config_data .= "//Â¥$MYSQL_HANDLER = array('mysql','mysql');Â¥n";
- $config_data .= "//Â¥$MYSQL_HANDLER = array('pdo','mysql');Â¥n";
- $config_data .= "Â¥$MYSQL_HANDLER = array('".$MYSQL_HANDLER[0]."','".$MYSQL_HANDLER[1]."');Â¥n";
- $config_data .= "Â¥n";
- $config_data .= "// main nucleus directory¥n";
- $config_data .= "Â¥$DIR_NUCLEUS = '" . $DIR_NUCLEUS . "';Â¥n";
- $config_data .= "Â¥n";
- $config_data .= "// path to media dir¥n";
- $config_data .= "Â¥$DIR_MEDIA = '" . $DIR_MEDIA . "';Â¥n";
- $config_data .= "Â¥n";
- $config_data .= "// extra skin files for imported skins¥n";
- $config_data .= "Â¥$DIR_SKINS = '" . $DIR_SKINS . "';Â¥n";
- $config_data .= "Â¥n";
- $config_data .= "// these dirs are normally sub dirs of the nucleus dir, but ¥n";
- $config_data .= "// you can redefine them if you wish¥n";
- $config_data .= "¥$DIR_PLUGINS = ¥$DIR_NUCLEUS . 'plugins/';¥n";
- $config_data .= "¥$DIR_LOCALES = ¥$DIR_NUCLEUS . 'locales/';¥n";
- $config_data .= "¥$DIR_LIBS = ¥$DIR_NUCLEUS . 'libs/';¥n";
- $config_data .= "Â¥n";
- $config_data .= "// include libs¥n";
- $config_data .= "include(Â¥$DIR_LIBS.'globalfunctions.php');Â¥n";
+ $config_data = '<' . '?php' . "\n";
+ $config_data .= "// mySQL connection information\n";
+ $config_data .= "\$MYSQL_HOST = '" . $MYSQL_HOST . "';\n";
+ $config_data .= "\$MYSQL_USER = '" . $MYSQL_USER . "';\n";
+ $config_data .= "\$MYSQL_PASSWORD = '" . $MYSQL_PASSWORD . "';\n";
+ $config_data .= "\$MYSQL_DATABASE = '" . $MYSQL_DATABASE . "';\n";
+ $config_data .= "\$MYSQL_PREFIX = '" . $MYSQL_PREFIX . "';\n";
+ $config_data .= "// new in 3.50. first element is db handler, the second is the db driver used by the handler\n";
+ $config_data .= "// default is \$MYSQL_HANDLER = array('mysql','mysql');\n";
+ $config_data .= "//\$MYSQL_HANDLER = array('mysql','mysql');\n";
+ $config_data .= "//\$MYSQL_HANDLER = array('pdo','mysql');\n";
+ $config_data .= "\$MYSQL_HANDLER = array('".$MYSQL_HANDLER[0]."','".$MYSQL_HANDLER[1]."');\n";
+ $config_data .= "\n";
+ $config_data .= "// main nucleus directory\n";
+ $config_data .= "\$DIR_NUCLEUS = '" . $DIR_NUCLEUS . "';\n";
+ $config_data .= "\n";
+ $config_data .= "// path to media dir\n";
+ $config_data .= "\$DIR_MEDIA = '" . $DIR_MEDIA . "';\n";
+ $config_data .= "\n";
+ $config_data .= "// extra skin files for imported skins\n";
+ $config_data .= "\$DIR_SKINS = '" . $DIR_SKINS . "';\n";
+ $config_data .= "\n";
+ $config_data .= "// these dirs are normally sub dirs of the nucleus dir, but \n";
+ $config_data .= "// you can redefine them if you wish\n";
+ $config_data .= "\$DIR_PLUGINS = \$DIR_NUCLEUS . 'plugins/';\n";
+ $config_data .= "\$DIR_LOCALES = \$DIR_NUCLEUS . 'locales/';\n";
+ $config_data .= "\$DIR_LIBS = \$DIR_NUCLEUS . 'libs/';\n";
+ $config_data .= "\n";
+ $config_data .= "// include libs\n";
+ $config_data .= "include(\$DIR_LIBS.'globalfunctions.php');\n";
$config_data .= "?" . ">";
$result = false;
@@ -1123,7 +1123,7 @@ function getMySqlVersion()
}
else
{
- $result = @sql_query('SHOW VARIABLES LIKE ¥'version¥'', $conn);
+ $result = @sql_query('SHOW VARIABLES LIKE \'version\'', $conn);
if ( $result != FALSE && @sql_num_rows($result) > 0 )
{
@@ -1134,7 +1134,7 @@ function getMySqlVersion()
{
//$output = shell_exec('mysql -V');
$output = ( function_exists('shell_exec') ) ? @shell_exec('mysql -V') : '0.0.0';
- preg_match('@[0-9]+Â¥.[0-9]+Â¥.[0-9]+@', $output, $version);
+ preg_match('@[0-9]+\.[0-9]+\.[0-9]+@', $output, $version);
$match = i18n::explode('.', $version[0]);
if ( $match[0] == '' )
@@ -1336,7 +1336,7 @@ function do_check_files()
if ( count($missingfiles) > 0 )
{
- exit(implode( "Â¥n", $missingfiles));
+ exit(implode( "\n", $missingfiles));
}
}
@@ -1497,7 +1497,7 @@ class PARAM_MANAGER
}
if ( $this->mysql_user != ''
- && !preg_match('/^[a-z0-9_Â¥-]+$/i', $this->mysql_user) )
+ && !preg_match('/^[a-z0-9_\-]+$/i', $this->mysql_user) )
{
$errors[] = sprintf(_ERROR2, _DB_FIELD2);
}
@@ -1513,7 +1513,7 @@ class PARAM_MANAGER
}
if ( $this->mysql_database != ''
- && !preg_match('/^[a-z0-9_Â¥-]+$/i', $this->mysql_database) )
+ && !preg_match('/^[a-z0-9_\-]+$/i', $this->mysql_database) )
{
$errors[] = sprintf(_ERROR2, _DB_FIELD4);
}
@@ -1571,7 +1571,7 @@ class PARAM_MANAGER
$this->user_password = '';
}
- if ( !preg_match("/^[a-z0-9Â¥._+Â¥-]+@[a-z0-9Â¥._Â¥-]+Â¥.[a-z]{2,6}$/i", $this->user_email) )
+ if ( !preg_match("/^[a-z0-9\._+\-]+@[a-z0-9\._\-]+\.[a-z]{2,6}$/i", $this->user_email) )
{
$errors[] = _ERROR7;
}
--
2.11.0