A: 

Just use UTF-8 for everything, and normally it will just work.

Reinis I.
Hey Reinis, i do not know how to use UTF-8 for everything. I believe i read somewhere that javascript uses some ISO coding. How do i change that?
Kim Alders
You can add a `charset="utf-8"` attribute to your external script elements to load them as utf-8. It's only required if you have unescaped string literals, though. CSS allows you to use `@charset 'utf-8';`, but this too is only required if you have unescaped string literals in your CSS, and it's rare. As for everything else, just set it to use UTF-8. Use an utf8 collation in MySQL, a `Content-Type: text/html;charset=utf-8` header for HTML etc.
Reinis I.
Thank you Reinis, i did all that already, as i described in my post above (the edited in part). It turned out that i used the wrong escape thingy in my javascript. Bah. But thanks again for your elaborate answer.
Kim Alders
+1  A: 

It shows like this: R�g on the webpage.

You need to instruct the webbrowser that you're displaying the webpage in UTF-8 and that it should interpret it as the same. Add the following to top of your PHP, before emitting any character to the output:

header('Content-Type: text/html; charset=utf-8');

Only the <meta> tag is not enough. This is not used by the webbrowser. It's the response header which counts. By the way, Javascript's escape() function is deprecated.

See also:

BalusC
Thanks BalusC. I added the line just below the session_start() but still the ë is shown as diamond with questionmark. And thatnks for the hint on deprecated function, i'll replace it.
Kim Alders
And thanks again, BelusC :-) Replacing escape with encodeURIComponent did the trick.
Kim Alders
@Kim you can mark this answer as accepted using the check mark symbol.
Pekka
Oh, you're submitting the form using JS? Btw, it's BalusC with an `a`, not `e`. And indeed, to mark a problem solved, you don't need to add some yelling to the question title, but just mark the most helpful answer accepted :) See also http://stackoverflow.com/faq
BalusC
LOL (i mean 'lol') i wasn't jelling, i was cheering from happiness, BalusC. Check is added, I'll change the title again...
Kim Alders