Page 1 of 1

more than one charset?

Posted: Mon Oct 20, 2008 3:07 pm
by nicosns
Hello,

Can I use more than one charset in the same page?

I have a html page in German language. In htaccess I use this html file as php and use the function 'include'. Now the html file works well with charset=ISO-8859-1, but the included file doesn 't. Last one works well with charset=utf-8. Can I use those 2 in the same page?? thx

Re: more than one charset?

Posted: Mon Oct 20, 2008 4:00 pm
by requinix
No, pick one and run with it.

If you're mixing charsets, pick a generic one like UTF-8 and encode everything into that format. Or you can encode the bad file into ISO 8859-1 which will leave the data intact yet understandable by the browser.

Re: more than one charset?

Posted: Mon Oct 20, 2008 5:11 pm
by nicosns
Thanks. I have found you can save a file in a different format within a text editor. This helps, but it's not perfect. Another solution that I found is that you can use ascii to replace the strange characters in one file, leaving the other (the file you include) like it is.

Maybe there is a simpler solution, so all post if you think it works. thx