SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Apr 2011
    Location
    Portugal
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problems with charset in IE and Firefox

    I have a problem with charset in IE and Firefox. In Chrome works well!!

    In my database i use the latin1-general encoding, and in my page i use the charset=ISO-8859-1

    Iím using this javascript code to animate and load my website!

    Code JavaScript:
    $('.down-trigger').on('click', function () {
    var toLoad = $(this).attr('href')+' #container';
         $('#container').attr('id','to-go');
         $('#wrapper').append('<div id="newcontainer"/>');
         $('#newcontainer').load(toLoad, function () {
           $('#newcontainer').append($('#container').children()).css({'position': 'absolute', 'top': '696px'});
           $('#to-go, #newcontainer').animate({top:'-=691'},600, function () {
             $('#to-go').remove();
             var lastchild = $('.page:last-child'); 
             var found = lastchild.find('div.slide'); 
             if (found.length == 0) { lastchild.remove(); } 
             carousels(); 
           });
         $('#container').remove();
         $('#newcontainer').attr('id','container');
         searchform(); 
         triggers(); 
       });
       return false;
    });

    But in Firefox and IE i have encoding problems, some character are like "elabora��"

    What i need to do?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,324
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    Why not use utf-8 everywhere? I don't understand why people use anything else, TBH, but there may be something I'm missing.

  3. #3
    SitePoint Member
    Join Date
    Apr 2011
    Location
    Portugal
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried change to utf-8, but does't solve the problem.

  4. #4
    SitePoint Member
    Join Date
    Mar 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    READ CAREFULLY THIS MAY BE THE SOLUTION!!

    I HAD A SIMILAR PROBLEM WITH AJAX AND I HAD TO PUT THE PHP FUNCTION header(); BEFORE ANY OUTPUT

    FOR EXAMPLE:

    header('Content-Type: text/html; charset=ISO-8859-1');
    ECHO "ANY TEXT";

    HOPE THAT HELPS!


Tags for this Thread

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
  •