Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

jquery ajax encoding issue

  • 18-11-2008 02:23PM
    #1
    Registered Users, Registered Users 2 Posts: 872 ✭✭✭


    Hi,

    I have an ASP page saved with windows-1252 encoding. This page loads an external page (same encoding) using jquery like so...
    $(".leftMain").load("leftContent.asp?code="+code+"&c="+c);
    

    The html that is loaded in is a couple of divs with German text.

    The inverted commas are turning into funny box like characters.

    I tried to put the following line on the external page being loaded but it didnt help
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
    

    This issue is only happening in IE

    Anyone any ideas ?

    Thanks


Comments

  • Moderators, Science, Health & Environment Moderators Posts: 9,078 Mod ✭✭✭✭mewso


    Is this asp or asp.net?

    meta elements specifying content types and charsets are generally just used for when the user saves the page to their own pc and then opens it. The webserver normally determines the actual content type and charset but you can generally specify it in your code by setting the header.

    Response.charset="utf-8" for example.

    utf-8 is the default in most asp/asp.net situations and is recommended. In any case you could try setting this to your desired charset.


Advertisement