Skip to content

Commit

Permalink
Merge 9fd658f into 1dcbb5c
Browse files Browse the repository at this point in the history
  • Loading branch information
okazy committed Oct 12, 2017
2 parents 1dcbb5c + 9fd658f commit 20d470a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Eccube/Doctrine/Common/CsvDataFixtures/CsvFixture.php
Expand Up @@ -27,6 +27,12 @@ public function __construct(\SplFileObject $file)
*/
public function load(ObjectManager $manager)
{
// 日本語windowsの場合はインストール時にエラーとなるので英語のロケールをセット
// ロケールがミスマッチしてSplFileObject::READ_CSVができないのを回避
if ('\\' === DIRECTORY_SEPARATOR) {
setLocale(LC_ALL, 'English_United States.1252');
}

// CSV Reader に設定
$this->file->setFlags(\SplFileObject::READ_CSV | \SplFileObject::READ_AHEAD | \SplFileObject::SKIP_EMPTY |\SplFileObject::DROP_NEW_LINE);

Expand Down

0 comments on commit 20d470a

Please sign in to comment.