jasonrogena / jasonrogena/php-excel-reader
Wrong encoding in dump function
- Dominant language
- PHP
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
```
What steps will reproduce the problem?
$data = new Spreadsheet_Excel_Reader();
$data->setOutputEncoding('windows-1251');
$data->read('test.xls');
echo $data->dump(true,true);
What is the expected output? What do you see instead?
1 тест
2 test
1 òåñò
2 test
Please provide any additional information below.
To fix this problem you need to replace line 635
$val = htmlentities($val);
with
$val = htmlentities($val , ENT_COMPAT | ENT_HTML401,$this->_defaultEncoding);
```
Original issue reported on code.google.com by `s.kor...@gmail.com` on 19 Oct 2012 at 12:06
Attachments:
- [test.xls](https://storage.googleapis.com/google-code-attachments/php-excel-reader/issue-157/comment-0/test.xls)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at line 635 in the dump function and reproduce the problem with test.xls using setOutputEncoding('windows-1251'). Verify that the dump output preserves the Cyrillic text while leaving the ASCII row unchanged, then add or run a regression check for the corrected encoding behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100