I have an AJAX tree to manage pages in a CMS-like manner. The leaves
can be clicked to expand an editor which allows the backend admin to
alter settings, set page titles, add content, etc. The site's primary
language is Danish, so we have a lot of æ, ø, and å characters.
If I got into the backend pages administration module and render the
tree, these special characters are rendered correctly, so that all
visible leaves with æ, ø, or å in them show these special characters
correctly. The page information tab in the Web Developer plugin for
Firefox show content encoding to be UTF-8 for both the response header
and the document encoding.
If i then click a leaf to expand it, an AJAX call is made to render a
partial in which I get a form with fields that will allow me to edit
titles and texts, among other things. Still, æ, ø, and å are displayed
If I then submit the form, again via AJAX, the data is saved correctly
(I can confirm that æ, ø, and å characters exist in the database, and
that they're rendered correctly in the frontend, and also in the
backend if I refresh the entire page), but the form that is refreshed
and rerended inside the tree leaf and which now contains the edited
and saved data, now shows special characters like "?" for text fields,
and for text areas it's the same character except it displays like a
diamond with a question mark inside of it - this is also how it looks
if I do a View Source on the page.
If I choose to change something else inside the form and save again,
all the "?" characters are now stripped away effectively killing all
æ, ø, and å characters.
Has anyone experienced something similar or have any good ideas about
where I might go and look to find clues?
Below are the headers from my request as shown by Firebug.
Thanks in advance for any help,