Q:

Username in different language

I have a registration form which corresponds correctly to db table if the language is English. IF language is Greek or sth else the username appears in table as encrypted (corrupted??). In the db table the utf8_general_ci is selected. What should i add in my code in order to have the same result in all languages. (result= in the db table see correctly user's username).

A:

Make sure the page that is serving the result is of the same encoding as the database's encoding. If you have UTF-8 data in your tables, but the page displaying these data are for instance ISO-8859-1, characters outside the ISO-8859-1 character set range would show up as strange.
In PHP one can modify headers for this:
header('Content-type: text/html; charset=utf-8');

