-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Description
This is:
- [X] a bug report
- [ ] a feature request
- [ ] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)
What is the expected behavior?
The processDomElement method dose not replace IDEOGRAPHIC SPACE(S) to a half-width space.
What is the current behavior?
The processDomElement method replaces IDEOGRAPHIC SPACES to a half-width space.
What are the steps to reproduce?
Outputting Excel with the text which has IDEOGRAPHIC SPACE(S) like below.
★
★
★
The processDomElement method in PhpOffice\PhpSpreadsheet\Reader\Html treats and replaces IDEOGRAPHIC SPACE (Full-width space) as Unicode to a half-width space like below.
So IDEOGRAPHIC SPACES is replaced to a half-width space.
CODE as is
$domText = preg_replace('/\s+/u', ' ', trim($child->nodeValue));HTML does not replace IDEOGRAPHIC SPACES to a half-width space.
And many Japanese people use IDEOGRAPHIC SPACES as a formating text.
So please replace spaces without the Unicode Option when outputting Excel.
CODE to be
$domText = preg_replace('/\s+/', ' ', trim($child->nodeValue));Which versions of PhpSpreadsheet and PHP are affected?
Ver 1.10.1
Best regards.
Metadata
Metadata
Assignees
Labels
No labels