Results 1 to 4 of 4

Thread: Dynamic Ajax Content and Accents

  1. #1
    Join Date
    Dec 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Dynamic Ajax Content and Accents

    Dynamic Ajax Content
    http://www.dynamicdrive.com/dynamici...jaxcontent.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!

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    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. é (é).
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Dec 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow Same Encoding

    Quote Originally Posted by Twey
    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?

  4. #4
    Join Date
    Dec 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    Quote Originally Posted by Twey
    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

    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. :-)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •