Re: Re: UTF-8 errors in RSS feed
| From: | Bastien Koert | Date: | Thu, 09 Oct 2008 00:35:52 +0000 |
| Subject: | Re: Re: UTF-8 errors in RSS feed | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-281631@lists.php.net to get a copy of this message | ||
[snip]
>
> I'm trying to load an external rss feed into a DomDocument, the feed says
>>>> it's uft-8 but DomDocument rightly disagrees. This causes a warning: Input
>>>> is not proper UTF-8, indicate encoding ! Bytes: 0xA3 0x36 0x35 0x20
>>>>
>>>> Is there any way I can get DomDocument to skip that part of the feed.
>>>> I'm not looking for the LIBXML_NOERROR option which results in not loading
>>>> the feed at all. The feed has some incorrectly encoded pound sign in it that
>>>> causes the problem. I'd much rather have the feed just without that pound
>>>> sign (or maybe some weird character) than not having the feed at all.
>>>>
>>>> Thanks,
>>>> Ron
>>>>
>>> [/snip]
What about a simple str_replace on the string before moving to the
DomDocument?
--
Bastien
Cat, the other other white meat