phprock wrote:What is this reallly ?. I see in the database
Collation is set to latin1_swedish_ci . Is it swedish language or what ? I want simple english langue.
This means that the collation is suitable for Swedish. Actually, the same collation works very well for the majority of European languages (i.e. what latin1 does). It sorts things by their natural order, taking into account the way that accented characters are sorted in Swedish (which I believe is similar if not identical to most other languages which use latin1).
Certainly for English it won't be a problem as A-Z and a-z will be sorted in the expected manner.
If you want to use multiple non-European languages on your site, you MUST use unicode. Don't even bother trying any other 8bit or multibyte characters.
To do this correctly you must at the very least:
- Create your MySQL tables with utf8 columns throughout
- Ensure that your client connection setting to mysql from PHP is utf8 - normally the easiest way of doing this is by issuing a "SET NAMES utf8" after connecting each time
- Write your PHP pages themselves in UTF8
- Write headers (and/or meta http-equiv) to the web browser to indicate that your pages (whether PHP or not) are in utf8. You can do this with header() for PHP, but you may need to modify Apache's settings to do it with other files.
You MAY ALSO need to do the following:
- Modify code which interfaces with third party systems to ensure that it's using utf8 (Notably: email)
- Change your PHP code to use utf8-aware versions of some functions - for example, using mbstring functions to do utf8 versions of some operations:
strlen() -> mb_strlen()
substr() -> mb_substr()
etc
Note that you'll still need the standard versions of these functions to cope with binary data if you're handling it anywhere. DO NOT use the overload thing to make strlen() into mb_strlen() automatically, as it will break your ability to handle binary data correctly.
Mark