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?

[table “” not found /]


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

Leave a Reply