Welcome to WebmasterWorld Guest from 100.26.182.28

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

PHP and character sets

     
6:33 pm on Sep 30, 2007 (gmt 0)

New User

10+ Year Member

joined:Mar 12, 2007
posts: 26
votes: 0


I recently moved my site to a different server which seems to use UTF-8 instead of the normal ISO-8859-1 character encoding. Since my scripts and my data all use the old encoding, I would like to switch the server back to ISO.

I know I can change the default_charset variable in the php.ini, but as far as I know that would only change the character set for output. What I need is a way to change the data in $_POST and $_GET to use ISO-8859-1 as well.

Can anybody help me?

8:03 pm on Oct 1, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 12, 2007
posts:766
votes: 0


The data in the $_POST & $_GET will be set by the encoding of the page that it has come from. So assuming your page are using iso-8859-1 then there shouldn't be a problem.

As iso-8859-1 is a subset of UTF-8 I cant imagine that there would be a problem with that iso coding within a UTF-8 environment. If you had it the other way around then there could be problems with UTF-8 characters in an iso-8859-1 environment as not all characters would be recognised.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members