jasonrogena / jasonrogena/php-excel-reader
Csv Reader (CSV.php) Unable to read chinese text in Unicode, UTF 8 files
- Dominant language
- PHP
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
```
What steps will reproduce the problem?
try
{
$fileName = 'tmp/test.csv';
$fileType = PHPExcel_IOFactory::identify($fileName);
$excelReader = PHPExcel_IOFactory::createReader($fileType);
$excelReader->setSheetIndex(0);
$excelReader->setDelimiter(' ');
$excelFile = $excelReader->load($fileName);
var_dump($excelFile);
}
catch (Exception $e) {
die("Error loading file: ".$e->getMessage()."
\n");
}
What is the expected output? What do you see instead?
I am expecting this code to pick up chinese String in B1 (see attached file
test.csv)
Please provide any additional information below.
File test.csv has been created by using notepad saving file using encoding UTF8.
```
Original issue reported on code.google.com by `s...@blubolt.com` on 27 Jan 2012 at 12:29
Attachments:
- [test.csv](https://storage.googleapis.com/google-code-attachments/php-excel-reader/issue-138/comment-0/test.csv)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in CSV.php and reproduce the report with the attached test.csv, using the shown PHPExcel_IOFactory loading code and UTF-8 encoding. Trace how the CSV reader handles the Chinese text in cell B1 and verify that the loaded value preserves it; done means the attached file is read correctly without breaking existing CSV behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100