/    Sign up×
Community /Pin to ProfileBookmark

Hi,

I am trying to implement the RSS of a persian website on my website but it shows all the characters really strange: [url]http://www.bornanews.com/NSITE/RSS/[/url]

This is the case only for this specific website, I have the RSS of other Persian websites and have no problem with them such as:
[url]http://www.tahlilerooz.ir/rss/anformatik.rss[/url]

What can I do to make it show all of them properly?

to post a comment
PHP

14 Comments(s)

Copy linkTweet thisAlerts:
@MindzaiJul 17.2009 — I don't know persian, but I don't see anything wrong in the first link. It looks the same as the second one to me anyway:

[upl-file uuid=31c5fd61-32f0-427a-8b12-8c26ac2e2196 size=96kB]Screenshot-Borna News Network - Mozilla Firefox.gif[/upl-file]
Copy linkTweet thisAlerts:
@XeroSiSauthorJul 17.2009 — Yeah it works fine there but not on my site, actually I noticed something similar in all the websites which show the RSS improperly on my site; they are all encoding="Windows-1256" while the ones that work for me are utf-8.

Is there anyway that on my site which I also use utf-8 to correctly show rss which is in different encoding?
Copy linkTweet thisAlerts:
@XeroSiSauthorJul 17.2009 — Please find attached how it is showing on my site.

[upl-file uuid=726e7936-6b07-4964-95c2-e27775cd344b size=28kB]1.jpg[/upl-file]
Copy linkTweet thisAlerts:
@MindzaiJul 17.2009 — Do you have a link to the page which is not displaying correctly? Make sure you have set the correct content-type header on each page. If this data is coming from a database, also make sure it is using utf8.
Copy linkTweet thisAlerts:
@XeroSiSauthorJul 18.2009 — I cant place it anywhere because it is not showing it properly and my users will get irritated, is there anyway you can tell me how I can view both utf8 and Windows-1256 encoding both on one page?
Copy linkTweet thisAlerts:
@MindzaiJul 18.2009 — I cant think of any reason why you would need to even if it were possible (which it isn't without using iframes or similar). utf8 will display everything correctly, it includes all of the windows-1256 characters, and just about any other character you could ever need.
Copy linkTweet thisAlerts:
@XeroSiSauthorJul 19.2009 — OK I have placed an example if you could have a look:

http://www.titrha.com/feed/football/

This is reading from:

http://www.footballiran.ir/Negaresh_Site/RSS/

See all the strange characters it is showing. How can I fix this?
Copy linkTweet thisAlerts:
@MindzaiJul 19.2009 — The RSS file is using utf-8. You don't appear to be sending the charset in the Content-Type response header (although you are using the correct meta tag). Some browsers rely on this header to be sent. Try adding the following line of code to your script before anything is output from it:

[code=php]header("Content-Type: text/html; charset=utf-8");[/code]
Copy linkTweet thisAlerts:
@XeroSiSauthorJul 20.2009 — hmm, I tried but no luck! Still the same problem exists.
Copy linkTweet thisAlerts:
@MindzaiJul 20.2009 — Somewhere along the way something is getting confused then. Can you post your PHP code used to generate that page?
Copy linkTweet thisAlerts:
@XeroSiSauthorJul 21.2009 — I am using http://www.feedforall.com/more-php.htm

if I can have your email address I can also provide you with the hosting information if you would like to have a look at the code.
Copy linkTweet thisAlerts:
@XeroSiSauthorJul 26.2009 — is there anyway we can modify this to get the issue fixed? Still was unable to do anything!
Copy linkTweet thisAlerts:
@criterion9Jul 27.2009 — Please post your code here for us to look at.
Copy linkTweet thisAlerts:
@XeroSiSauthorJul 29.2009 — actually there is quite a lot of code involved, I am willing to give access to the folder though since I already have backup if you have the time to take a look at it would be excellent!
×

Success!

Help @XeroSiS spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...