Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

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,205 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