Defect #20

SimplePie::set_raw_data() fails with UTF-16LE data

Added by Geoffrey Sneddon 769 days ago. Updated 769 days ago.

Status:Verified Start:2008-02-04
Priority:High Due date:
Assigned to:Geoffrey Sneddon % Done:

0%

Category:Data Input
Target version:1.1.1
PHP Version:

5.2.4


Description

This is the old SP fora 968 with related test case.

Associated revisions

Revision 952
Added by Geoffrey Sneddon 769 days ago

Remove trim() (this means some ill-formed stuff doesn't get in, oh well…). This fixes #20.

History

Updated by Geoffrey Sneddon 769 days ago

  • Status changed from Fixed to Verified

As we have a test case for this bug, and it now passes with nothing regressing, closing.

Updated by Geoffrey Sneddon 769 days ago

For those who don't understand the relevance of trim(): an XML file MUST end with >, which in UTF-16LE is encoded as 3E 00 — trim(), among other things, strips null bytes, making the last 16-bit word invalid (as it is only 8-bits long), so the Unicode decoder treats the character as U+FFFD REPLACEMENT CHARACTER, leading to an XML parse error.

Also available in: Atom PDF