Forum Moderators: open

Message Too Old, No Replies

Using multiple charsets ...

Is it posssible?

         

caspita

4:33 pm on Nov 10, 2004 (gmt 0)

10+ Year Member



Hi All,

I'm using some rss feeds on one of my pages to display some related news but I'm having some issues with the different charsets being used by the feeds.

Basically I have one feed comming as 'UTF-8' and another one comming as 'iso8859-1' and when I' combining both feeds into one single page I'm having output issues.. the page is not showing what is suppose for some special chars... even for english I'm having problems. If I switch from one charset to the other one one feed shows fine and the other one does not.. I know I could use iframes or so and set a different charset for each one but that would be my last resource ;-) .. I'd like just to have the single page.

Is the some way that I can use miltiple meta tags like the one below so I can get the issue fixed? or is there some special charset that handle both?


<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

Also, I'm using php to pull the feeds and store them into a table so I think at that moment I could convert them also.. is there some function in php supporting this? I have been looking at the htmlentities, ect funcition but I have not been able to make it work.

Thanks for your help.

tedster

4:30 am on Nov 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Definitely a complex issue - you may want to ask related questions in our PHP Forum [webmasterworld.com] or our RSS Forum [webmasterworld.com]. I don't think meta-tags alone are going to fix this.

A bit of research turned up the .iconv functions module in PHP 5+ which converts character strings in one charset to another. Since UTF-8 is the most inclusive, I think you want to convert the Western European ISO8859-1 to UTF-8.

But I'm no PHP pro by a long leap! So as I said, maybe ask questions in our PHP Forum.

Also

caspita

5:08 pm on Nov 11, 2004 (gmt 0)

10+ Year Member



Thanks tester... Actually I did that also.. I went with our PHP friends here [webmasterworld.com...] and they were very helpfull .. my page is working much better now and as you said I decided to go converting to UTF-8.

Thanks,