jasonrogena / jasonrogena/php-excel-reader

htmlentities breaks encoding

Open
#56 0 comments 0 reactions 0 assignees View on GitHub
auto-migrated Priority-Medium Type-Defect
Dominant language
PHP
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

```
What steps will reproduce the problem?
1. works with any non-english character set.

I suggest a simple fix - Pass encoding to htmlentities.

Just replace
$val = htmlentities($val);
with
$val = htmlentities($val, ENT_NOQUOTES, $this->_defaultEncoding);

I'm attaching a diff.
```

Original issue reported on code.google.com by `ilian.tz...@gmail.com` on 21 Dec 2009 at 1:31

Attachments:
- [encoding fix.diff](https://storage.googleapis.com/google-code-attachments/php-excel-reader/issue-56/comment-0/encoding fix.diff)

Contributor guide

No contributing guide indexed for this repository

Research direction

Search the repository for the exact htmlentities($val) call and compare it with the attached encoding fix.diff. Confirm how _defaultEncoding is defined and used, then update the call to pass the encoding while preserving ENT_NOQUOTES. Done means non-English character sets no longer lose or corrupt their encoding.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
localization
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.