Samuel Sjöberg's weblog

Skip to navigation

Character encoding solved

I had almost given up. Almost. Yesterday I talked to Marcus Johansson about the problem and this morning he had sent me a message that he didn't see that I set the character encoding anywhere in the AJAX response.

The funny thing is that I had thought about this morning. So, encourage by his message I tried to add the following line in my response page:

header('Content-type: text/html; charset=UTF-8');

Guess what. It works!

I decided to keep the UTF-8 encoding in the project because I have learned that UTF-8 is used by xmlHttpRequest and is the default XML encoding. Now I can get back to actually make stuff work after a two week mental meltdown.

Pages linking to this entry

Pingback is enabled on all archived entries. Read more about pingback in the Pingback 1.0 Specification.

About this post

Created 7th November 2005 13:20 CET. Filed under Javascript and DOM.

0 Pingbacks