Ticket #218 (closed バグ指摘: 修正済)

Opened 14 years ago

Last modified 11 years ago

PHP5 の環境で, 商品 CSV 登録ができない

Reported by: nanasess Owned by: Yammy
Priority: Milestone: EC-CUBE
Component: フロント Version: 2.1.1(ベータ版)
Keywords: Cc:
修正済み:

Description (last modified by Yammy) (diff)

EC-CUBE 2.1.1Betaに取り込まれ済

Change History

comment:1 in reply to: ↑ description ; follow-up: ↓ 2 Changed 14 years ago by nanasess

上記では, 中文版など, 他のロケールでは対応できない可能性がある.
また, Windows 環境では, ロケール設定のため, 別の文字列を使用する必要がある.

以下, 定数として設定する案.

Index: html/install/sql/insert_data.sql
===================================================================
--- html/install/sql/insert_data.sql	(revision 16959)
+++ html/install/sql/insert_data.sql	(working copy)
@@ -767,6 +767,7 @@
 INSERT INTO mtb_constants VALUES ('CREDIT_HTTP_ANALYZE_PROGRAM','"rcv_credit.php"',37,'決済受信用URL');
 INSERT INTO mtb_constants VALUES ('CREDIT_HTTP_ANALYZE_URL','CREDIT_HTTP_DOMAIN . CREDIT_HTTP_ANALYZE_PROGRAM',38,'決済受信用URL');
 INSERT INTO mtb_constants VALUES ('CHAR_CODE','"UTF-8"',39,'文字コード');
+INSERT INTO mtb_constants VALUES ('LOCALE','"ja_jp.UTF-8"',40,'ロケール設定');
 INSERT INTO mtb_constants VALUES ('ECCUBE_PAYMENT','"EC-CUBE"',41,'決済モジュール付与文言');
 INSERT INTO mtb_constants VALUES ('PEAR_DB_DEBUG','9',42,'PEAR::DBのデバッグモード');
 INSERT INTO mtb_constants VALUES ('LOAD_BATCH_PASS','3600',43,'バッチを実行する最短の間隔(秒)');
Index: data/class/SC_Initial.php
===================================================================
--- data/class/SC_Initial.php	(revision 16959)
+++ data/class/SC_Initial.php	(working copy)
@@ -118,6 +118,8 @@
         ini_set("mbstring.internal_encoding", CHAR_CODE);
         ini_set("mbstring.detect_order", "auto");
         ini_set("mbstring.substitute_character", "none");
+        // ロケールを明示的に設定
+        setlocale(LC_ALL, LOCALE);
     }
 
     /**
Index: data/mtb_constants_init.php
===================================================================
--- data/mtb_constants_init.php	(revision 16959)
+++ data/mtb_constants_init.php	(working copy)
@@ -67,6 +67,8 @@
 define('CREDIT_HTTP_ANALYZE_URL', CREDIT_HTTP_DOMAIN . CREDIT_HTTP_ANALYZE_PROGRAM);
 /** 文字コード */
 define('CHAR_CODE', "UTF-8");
+/** ロケール設定 */
+define('LOCALE', "ja_jp.UTF-8");
 /** 決済モジュール付与文言 */
 define('ECCUBE_PAYMENT', "EC-CUBE");
 /** PEAR::DBのデバッグモード */

comment:2 in reply to: ↑ 1 Changed 14 years ago by nanasess

nanasess への返信

上記 typo 有り... 下記パッチで動作する模様

Index: html/install/sql/insert_data.sql
===================================================================
--- html/install/sql/insert_data.sql	(revision 16959)
+++ html/install/sql/insert_data.sql	(working copy)
@@ -767,6 +767,7 @@
 INSERT INTO mtb_constants VALUES ('CREDIT_HTTP_ANALYZE_PROGRAM','"rcv_credit.php"',37,'決済受信用URL');
 INSERT INTO mtb_constants VALUES ('CREDIT_HTTP_ANALYZE_URL','CREDIT_HTTP_DOMAIN . CREDIT_HTTP_ANALYZE_PROGRAM',38,'決済受信用URL');
 INSERT INTO mtb_constants VALUES ('CHAR_CODE','"UTF-8"',39,'文字コード');
+INSERT INTO mtb_constants VALUES ('LOCALE','"ja_JP.UTF-8"',40,'ロケール設定');
 INSERT INTO mtb_constants VALUES ('ECCUBE_PAYMENT','"EC-CUBE"',41,'決済モジュール付与文言');
 INSERT INTO mtb_constants VALUES ('PEAR_DB_DEBUG','9',42,'PEAR::DBのデバッグモード');
 INSERT INTO mtb_constants VALUES ('LOAD_BATCH_PASS','3600',43,'バッチを実行する最短の間隔(秒)');
Index: data/class/SC_Initial.php
===================================================================
--- data/class/SC_Initial.php	(revision 16959)
+++ data/class/SC_Initial.php	(working copy)
@@ -118,6 +118,8 @@
         ini_set("mbstring.internal_encoding", CHAR_CODE);
         ini_set("mbstring.detect_order", "auto");
         ini_set("mbstring.substitute_character", "none");
+        // ロケールを明示的に設定
+        setlocale(LC_ALL, LOCALE);
     }
 
     /**
Index: data/mtb_constants_init.php
===================================================================
--- data/mtb_constants_init.php	(revision 16959)
+++ data/mtb_constants_init.php	(working copy)
@@ -67,6 +67,8 @@
 define('CREDIT_HTTP_ANALYZE_URL', CREDIT_HTTP_DOMAIN . CREDIT_HTTP_ANALYZE_PROGRAM);
 /** 文字コード */
 define('CHAR_CODE', "UTF-8");
+/** ロケール設定 */
+define('LOCALE', "ja_JP.UTF-8");
 /** 決済モジュール付与文言 */
 define('ECCUBE_PAYMENT', "EC-CUBE");
 /** PEAR::DBのデバッグモード */

comment:3 Changed 14 years ago by Yammy

  • Owner changed from somebody to Yammy

comment:4 Changed 14 years ago by Yammy

 https://svn.ec-cube.net/open/branches/comu-ver2 へコミットしました。

comment:5 Changed 14 years ago by Yammy

  • Status changed from new to closed
  • Version changed from 2.0系(正式版) to 2.1.1(ベータ版)
  • Resolution set to 修正済
  • Description modified (diff)

EC-CUBE 2.1.1Betaに取り込まれ済

comment:6 Changed 11 years ago by Seasoft

コミュニティ関連チケット。

Note: See TracTickets for help on using tickets.