PHP File Encoding

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
icesolid
Forum Regular
Posts: 502
Joined: Mon May 06, 2002 9:36 pm
Location: Buffalo, NY

PHP File Encoding

Post by icesolid »

What is a better format to save my PHP files in? UTF-8 or Ansi?

Is using UTF-8 better for special chars in forms?
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: PHP File Encoding

Post by VladSun »

UTF-8 is better.
There are 10 types of people in this world, those who understand binary and those who don't
icesolid
Forum Regular
Posts: 502
Joined: Mon May 06, 2002 9:36 pm
Location: Buffalo, NY

Re: PHP File Encoding

Post by icesolid »

Why is that?
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: PHP File Encoding

Post by VladSun »

You can get a lot of information about it : http://en.wikipedia.org/wiki/UTF-8#General
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: PHP File Encoding

Post by requinix »

Beware the BOM though - it'll cause you headaches if you don't know about it.
Post Reply