Defect #20

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

Added by Geoffrey Sneddon 95 days ago. Updated 95 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
Affected Version :

PHP Version :

5.2.4

mbstring enabled :

iconv enabled :

cURL enabled :

zlib enabled :


Description

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

Associated revisions

Revision 952
Added by gsnedders 95 days ago

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

History

2008-02-04 12:50 - Geoffrey Sneddon

  • Status changed from Fixed to Verified

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

2008-02-04 13:32 - Geoffrey Sneddon

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