Re: strange character

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The address is an RSS feed, so it is probably changing frequently.  I imagine that articles that are being added are not being properly vetted, so some are coming in with an Arabic encoding, probably either CP1256 or ISO-8859-6.

Hadi, you are going to have to check all of your input.  The title and description fields of the xml feed will contain Arabic text, some of which may be wrong.

Maybe you can just ignore the errors.

Peter West
"...and whoever says, ‘Fool! ’ will be liable to the hell of fire"

> On 28 Feb 2015, at 3:01 am, Christoph Becker <cmbecker69@xxxxxx> wrote:
> 
> Ashley Sheridan wrote:
> 
>> 
>> On 27 February 2015 16:11:22 GMT+00:00, Christoph Becker <cmbecker69@xxxxxx> wrote:
>>> Ashley Sheridan:
>>> 
>>>> On 27 February 2015 14:36:50 GMT+00:00, hadi
>>> <almarzuki2011@xxxxxxxxxxx> wrote:
>>>>> 
>>>>> Here is the web site im getting error while trying to download rss
>>> feed
>>>>> from it.
>>>>> http://www.sahafah.net/rss.php
>>>> 
>>>> I've had a look at the RSS feed and it is set to utf-8, both in the
>>> xml declaration and the http headers.
>>>> 
>>>> I have to assume the broken characters are because of something in
>>> your script. Are you sure your PHP is saved into a utf-8 format? 
>>> 
>>> No, the feed is not properly UTF-8 encoded.  Have a look at it with
>>> Google Chrome, for instance:
>>> 
>>> | This page contains the following errors:
>>> |
>>> | error on line 240 at column 208: Encoding error
>>> 
>>> As I already said elsewhere in this thread, hadi would have to strip
>>> out
>>> the bad UTF-8 character sequences.  Or maybe inform the provider of the
>>> feed about the error.
>> 
>> Ah, I was just looking at raw headers with cURL. Just checked that character indicated by your error and it's a letter i.
> 
> I just checked the feed again, and Chrome doesn't report any errors
> anymore.  Line 240 has only 65 characters now.
> 
> -- 
> Christoph M. Becker
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux