I think this is a bug.
after update system from fc3 to fedora core 4 .watchdog get these error log:
"Bytes: 0xE7 0x99 0xBE 0xE5 in /drupal/modules/aggregator.module on line 464." and
"input conversion failed due to input error in /drupal/modules/aggregator.module on line 464."

Comments

huyl’s picture

I just download cvs package today and test a gb2312 encoding rss feed.this
problem still at cvs package too.

huyl’s picture

Status: Active » Needs review

I get it,just delete this line at function "drupal_xml_parser_create":
$encoding = $match[1];
or delete all lines before this line at function "drupal_xml_parser_create":
$xml_parser = xml_parser_create($encoding);
and change this line to:
$xml_parser = xml_parser_create("utf-8");

Steven’s picture

Status: Needs review » Closed (won't fix)

This is rediculous... if you have problems parsing a GB2312 encoded feed, why would you change the parser to use UTF-8 encoding? Drupal should correctly detect the encoding and convert. The only problem is when you don't have iconv, mbstring or recode installed. In that case you should get a clear watchdog error.

The URL of the problematic feed in question would help a lot.

mgifford’s picture

I've run into the same error with fc4 on 4.6 code base. The solution here doesn't work with the new function definitions though:
http://drupaldocs.org/api/head/function/drupal_xml_parser_create

encoding is pre-defined

Bytes: 0x9D 0x20 0x48 0x75 in /home/hameedlaw.ca/public_html/cs082/modules/aggregator.module on line 428.

This code validates:
http://hrw.org/rss/?t=news_rss

Mike

huyl’s picture

I think steven didn't understand what i said.
there are no problem under php4.X like fc3 system.but i had said this problem find under fc4,fc4's php is php5.X please.
xml_parser_create() funtion of php:
"Starting from PHP 5, the input encoding is automatically detected, so that the encoding parameter specifies only the output encoding."
so we must specifies utf-8 as output encoding and must delete check encode code line under php5.x.

yes,xml_parser_create() still parse error at same rss feed too ,i think it's php's problem .
anybody have better solution?