mheiming
20 Nov 2012, 1:15 AM
Hi there,
as already mentioned in the comments of the function Ext.encode (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.JSON-method-encode) there is an unexpected behavior of this function (at least for me).
When i have some sepcial characters like "german umlauts" "Ä".
Ext.encode does escape the characters as seen in the following example:
Ext.encode("Bäuerle") results in:
"B\u00e4uerle"
Of course i tried to enable Ext.USE_NATIVE_JSON to use the native JSON encode methode from the browser if possible but this does result in the same outputs.
var string = "Bäuerle";
console.log(string);
Ext.USE_NATIVE_JSON = true;
string = Ext.encode(string);
Ext.USE_NATIVE_JSON = false;
console.log(string);
gives me this output:
Bäuerle
"B\u00e4uerle"
I am working with Chrome v24 and Firefox v16.
May someone give me a hint how to solve this? :)
Thanks in advance!
as already mentioned in the comments of the function Ext.encode (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.JSON-method-encode) there is an unexpected behavior of this function (at least for me).
When i have some sepcial characters like "german umlauts" "Ä".
Ext.encode does escape the characters as seen in the following example:
Ext.encode("Bäuerle") results in:
"B\u00e4uerle"
Of course i tried to enable Ext.USE_NATIVE_JSON to use the native JSON encode methode from the browser if possible but this does result in the same outputs.
var string = "Bäuerle";
console.log(string);
Ext.USE_NATIVE_JSON = true;
string = Ext.encode(string);
Ext.USE_NATIVE_JSON = false;
console.log(string);
gives me this output:
Bäuerle
"B\u00e4uerle"
I am working with Chrome v24 and Firefox v16.
May someone give me a hint how to solve this? :)
Thanks in advance!