1. #1
    Sencha User
    Join Date
    Oct 2008
    Posts
    81
    Vote Rating
    0
    Pachat is on a distinguished road

      0  

    Default Ext.AJAX.request and UTF8

    Ext.AJAX.request and UTF8


    Hi,

    From the my.php file called by AJAX, I have,
    Code:
    echo json_encode('Ce message a été posté par Bart');
    My AJAX is
    Code:
        Ext.Ajax.request({
            url: 'myl.php',
            timeout: 3000,
            method: 'GET',
            success: function(xhr) {
                alert('Response is "' + xhr.responseText + '"');
            }
        });
    What I get is
    Code:
    Response is ""Ce message a \u00e9t\u00e9 post\u00e9 par Bart""
    The use of
    Code:
            //headers: { 'Content-Type': 'application/json; charset=utf-8' },
            //headers: { 'Content-Type': 'text/html; charset=UTF-8' },
    inside Ext.Ajax.request has no effects

    What do I have to do to see ?
    Code:
    Response is ""Ce message a été posté par Bart""

  2. #2
    Sencha User Zeebee's Avatar
    Join Date
    Nov 2009
    Location
    zaventem
    Posts
    53
    Vote Rating
    0
    Zeebee is on a distinguished road

      0  

    Default


    Try setting your header in your php file, that worked for me some time ago. Lets hope for you too

Thread Participants: 1