PHP+flash spec char trouble

Hi loading data from textbox to textfile via a PHP script. The problem is that the PHP script is “distorting” the data.
When using spec chars such as ä,ö,å the data that is saved to the textfile is something else.
I´ve tested to load text from textfile to swf and the spec chars shows up ok så the problem lays in the PHP but I can´t find anything wrong with it!?

Please help me.

Attaching the script.

And here´s a link to what it looks like http://www.willycranes.com/temp/

Appreciate all the help!

I guess I was a but unclear in my description of the problem, sorry. :nerd:

The whole thing is a guestbook and the problem is that when making a post in the guesbook the PHP script “distorts” the text before it is saved into the textfile. When checking the textfile after making a post the “distorted” text is already there.
Then when flash is importing the text it is imported correctly (the problem is that it´s already “distorted” in the textfile).

Jesus it´s hard to explain these thing in textform.

Hope it makes any sense to you guys.

Sure, makes sense allright.
What you’re saying is, PHP saves the special chars sent from Flash wrongly, and when Flash asks them back for display, of course it can only get the wrong ones…
Try to echo the stuff you are going to save to file to a browser window and tell me what you get/upload an example/ zip up your files…