Results 1 to 4 of 4

Thread: Problem with accents when updating menus/panels

  1. #1
    Sencha User
    Join Date
    May 2009
    Location
    Paris, France
    Posts
    10

    Default Problem with accents when updating menus/panels

    I have a problem with accentuated letters in panels/menus.
    My project is using ISO-8859-1 in the loading html page:
    Code:
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    Then I'm using a menu including:
    Code:
     
    vee.B_you = new Ext.Toolbar.TextItem({text:'Connecté / connecté : <b>'});
    Edit: in this code, the first "é" is actually coded "#233;", but I don't manage to display it there.
    It renders fine (see attachment #1) and displays as expected. Somewhere else, I'm updating this object with:
    Code:
    vee.B_you.update('Connecté / connecté : <b>' + user + '</b>');
    Then, the non-UTF-8 accentuated letter "é" displays incorrectly (see attached screenshot #2).
    I have the same problem with an Ext.TabPanel:
    Code:
    Tab_Accueil = new Ext.TabPanel({id: 'Tab Accueil' , title:'Défaut'
     , html:'çà c\'est un essai élégant de caractères accentués'});
    is fine, but I have the problem when applying:
    Code:
    var tmp=R.getComponent('center');
     tmp.getComponent('Tab Accueil').body.update('Bienvenue ' + user + ', çà c\'est un essai élégant de caractères accentués');
    Any idea?
    Attached Images Attached Images

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Are both your html and javascript file in ISO-8859-1?

  3. #3
    Sencha User
    Join Date
    May 2009
    Location
    Paris, France
    Posts
    10

    Default

    Condor, do you mean:
    Code:
     <script type="text/javascript" src="main.js"            charset="ISO-8859-1"></script>
    ?
    If it's your question, yes it is. If I change this to:
    Code:
     <script type="text/javascript" src="main.js"            charset="UTF-8"></script>
    The problem switches (see screenshot)
    Attached Images Attached Images

  4. #4
    Sencha User
    Join Date
    May 2009
    Location
    Paris, France
    Posts
    10

    Default

    Well...
    I have reworked my ExtJS code and for an unknown reason the problem disappeared (I have not changed the html file). I really don't known how this happened.

Posting Permissions

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