Bug #20671
xml2array identifies UTF-8 files with BOM as ISO-8859-1
| Status: | New | Start date: | 2009-06-25 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
| TYPO3 Version: | 4.3 | Complexity: | ||
| PHP Version: | 4.3 | |||
| Votes: | 0 |
Description
When parsing an XML file with xml2array, it will identify the file as ISO-8859-1 if you try to load a real UTF-8 file with Byte-Order-Mark at the beginning. This is caused by the regular expression, which will not match if there are other characters than spaces before the XML header.
I found the bug in Typo3 v4.2.5, but it is also present in the current v4.3-.0-alpha3.
I attached a patch for class.t3lib_div.php which fixes the bug, although I'm not sure if there are any other locations this needs to be fixed.
(issue imported from #M11411)
History
Updated by Steffen Gebert over 1 year ago
- File deleted (
class.t3lib_div.php.patch)
Updated by Steffen Gebert over 1 year ago
- File class.t3lib_div.php.patch added
- Target version deleted (
0)