PDA

View Full Version : Dynamic Ajax Content and Accents



islandtalker
12-12-2005, 12:27 AM
Dynamic Ajax Content
http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm


Accents on the page to be load () either don't display correctly or breaks the html code. Any ideas how to deal with this?

Thanks!

Twey
12-12-2005, 08:24 AM
I think you just need to make sure that the page to be loaded uses the same character encoding as the page it's being loaded to. Also, you could try replacing the accented characters with their HTML-entity counterparts, E.G. é ().

islandtalker
12-12-2005, 02:21 PM
I think you just need to make sure that the page to be loaded uses the same character encoding as the page it's being loaded to. Also, you could try replacing the accented characters with their HTML-entity counterparts, E.G. é ().

Same encoding. Can't change the characters because its loading content from a database and they are already have the accents in it. Hmm... I could writte a script and swith the accent for their html entity, but it would be reading ntext fields, performace may be an issue. I'm sure it has something to do with the way the ajax is calling the page.

Anyone has any other idea?

islandtalker
12-13-2005, 01:46 AM
I think you just need to make sure that the page to be loaded uses the same character encoding as the page it's being loaded to. Also, you could try replacing the accented characters with their HTML-entity counterparts, E.G. é ().


Then again, you are right... hehe :rolleyes:

I was using
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> on both pages, just because of the accent issue, but it was not working.

So I tried <%response.Charset="ISO-8859-1"%> inside the head. Works perfectly. :-)