views:

51

answers:

3

I'm self-taught php programmer, so I often don't know the "correct" way to do something. I want to normalize my character encoding practices between my PHP, HTML, and MySQL data.

-- live in the US,
-- work on sites for people who speak English,
-- most foreign languages I will encounter are western (Spanish, Italian, French)
-- living near NYC I could encounter Hebrew, Russian, etc. though I'd avoid using their character system and would only use whatever accents necessary to use Latin characters.

Anyone want to comment on which I should choose UTF-8 or ISO-8859-1? Or something else? Chris

+7  A: 

IMHO it's always best to work with UTF-8. Your preferences will not always reflect your users' preferences, which might happen to really like hebrew or Russian. שלום!

ozk
I tend to go the same way. I just ensure that everything is UTF-8 all the way through, so I don't kick myself later.
timdev
A: 

If your application is going to support only one language - it's better to use that language's native encoding. With two or more - consider UTF-8.

FractalizeR