Getting rid of special characters

So you want to create the username based on the name of the person. Well if the person is of nordic decent he/she might have funny characters that might brake your scripts. So how do we guarantee that you only get a-z?

For fun we will be calling our new user Räksmörgås, why is that? Well it is a swedish word containing all of our special characters. And I do like shrimp sandwish.

First we start with the really lazy approach:

Well that doesn’t really make me happy. I can’t visualize the word using what I got so I need to pick it up a notch.

Now we are close so I really like an all small character username. So

Now im happy.

So what characters are changed when using the Normalize way?

Original Char Replaced with
À A
Á A
 A
à A
Ä A
Å A
Ç C
È E
É E
Ê E
Ë E
Ì I
Í I
Î I
Ï I
Ñ N
Ò O
Ó O
Ô O
Õ O
Ö O
Ù U
Ú U
Û U
Ü U
Ý Y
à a
á a
â a
ã a
ä a
å a
ç c
è e
é e
ê e
ë e
ì i
í i
î i
ï i
ñ n
ò o
ó o
ô o
õ o
ö o
ù u
ú u
û u
ü u
ý y

Comments

  1. hi
    your solution is great. my problem is Resolved.
    congratulations.

Leave a Reply