The behavior of xml_parser($encoding) changed in PHP5 :
Starting from PHP 5, the input encoding is automatically detected, so that the encoding parameter specifies only the output encoding [and not anymore the output encoding].
This change brakes the conversion of encoding of XML documents done by Drupal in function drupal_xml_parser_create() : we now need to change the encoding= parameter in the <?xml ?> tag after the conversion to utf-8.
Among others, this affects the aggregator module.
The included patch is a one-line addition in include/common.inc (in 4.6.5 and lower), or in include/unicode.inc (since 4.7.0).
- DamZ
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | _49497_php5xml.patch | 1.88 KB | morbus iff |
| drupal_xml_parser.patch | 453 bytes | damien tournoud |
Comments
Comment #1
Zen commentedDowngrading. Please confirm if this is necessary for 4.7 for a better chance of getting this in.
Thanks
-K
Comment #2
damien tournoud commentedThis is needed in all code bases since the first implementation of
drupal_xml_parser_create(), thus including drupal 4.6.5 AND the current HEAD.Upgrading the priority again.
- DamZ
Comment #3
Zen commentedPlease also provide a patch against HEAD and a link to related documentation.
Thanks
-K
Comment #4
morbus iffThis will not be fixed for 4.6.x. If it were, it gives license (and "but we haveee tOOO!") to backport phptemplate in core (since xtemplate doesn't work in php 5.1.x). Thus, it's a HEAD only issue.
Comment #5
morbus iffIt appears this patch attempts to do the right thing, but it sets "utf8" instead of "utf-8".
Comment #6
dries commentedDoesn't apply against CVS HEAD.
Comment #7
morbus iffUpdated patch with new docs, less code, and a small bugfix.
Comment #8
dries commentedCommitted to HEAD. Thanks.
Comment #9
(not verified) commented