views:

439

answers:

1

Hi,

i would like to generate strict alphanumeric character logins from users' first and lastname. Since many of them are foreigners, their names have special characters (é, è, ï, ...). I would like to remove the accents (e,e,i,...) in the logins.

Here is my query. Is there a character set that does not contain accents?

UPDATE contacts SET login=CONVERT(LOWER(CONCAT(firstname,'.',lastname)) USING utf8);
+2  A: 

Well, as a French computer scientist (with an accent in his name), I would strongly advocate against such a conversion.

Why, well, because this strategy is just replacing a wrong assumption with another wrong assumption. Let me explain myself:

We could see the fact that only us-ascii are allowed in login id as an incorrect assumption that "all user names can be written in ascii".

Trying to remove accents from users name is just replacing the assumption by "all user names can be converted to ascii".

That is also incorrect: It will work for me (as a European - Latin 1 proof named person), but how will you compute the name of 三島 ? or the one of Сахаров ?

I know my answer is non technical, but you should do whatever is necessary to allow non ascii chars in logins. Or, you should allow your users to choose this login.

dodecaplex