html - accent not showing in jQuery load -


I am working on a small site which I would like to change a little bit, so that it is more dynamic. Index .html is something like this

  & lt; Html & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = iso-8859-1" & gt; ... & lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "page" & gt; & Lt; Div id = "header" & gt; & Lt; / Div & gt; & Lt; Div id = "main" & gt; & Lt; Div id = "menu" & gt; & Lt; / Div & gt; & Lt; Div id = "content" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div id = "footer" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; Html & gt;  

I use jQuery and for example I load the "menu.html" file in the "menu" div. Menu.html Something like this:

  & lt; Ul & gt; & Lt; Li & gt; & Lt; An id = "item 1" & gt; Item 1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; An id = "item 2" & gt; Item 2 & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt;  

I have added some code to JQuery, so that when an item is clicked on "item1" an item 1.html file is loaded in the "content" div. It works fine except that I did not get any accent from menu1.html (instead of something '?')

item1.html is something like this:

  Hello, this is my file c'est un & lt; Strong & gt; Fichier & lt; / Strong> EVEK DES ACCOUNTS A,  

I do not have any html, body tag in those files (only in the index).

Do you please

hide> It looks like encoding problems.

Is ISO-8859-1 your item 1 encoded? Is your web server configured to include ISO-8859-1 in the header of a web page? Do the accents work in your main file if kept there? Try to check that the encodings in each file are identical and sent in the correct way.

If that does not work, then you can also try to switch the whole project to utf-8. These days, there is no reason to use iOS in particular in non-English projects.

Pat's answer probably will work for you, but will not solve the fundamental problem and it will be difficult to create new pages. / P>


Comments