View Full Version : Problem with accents when updating menus/panels

6 Apr 2010, 6:06 AM
I have a problem with accentuated letters in panels/menus.
My project is using ISO-8859-1 in the loading html page:

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
Then I'm using a menu including:

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:

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:

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:

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?

6 Apr 2010, 6:32 AM
Are both your html and javascript file in ISO-8859-1?

6 Apr 2010, 6:49 AM
Condor, do you mean:

<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:

<script type="text/javascript" src="main.js" charset="UTF-8"></script>
The problem switches (see screenshot) :-/

6 Apr 2010, 8:30 AM
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.