View Full Version : utf8 - again

16 Aug 2007, 9:05 AM
i read a lot of posts with troubles with specialchars.
I have utf8-pages, data in DB is utf8, normal HTML and php works with utf8.
But if i make ajax calls with Ext.data.Store i run into problems.
My temporary solution is to run through the dataarrays before json_encode and make a utf8_encode, but this can not be the best solution.
Turning page to iso is no given choice.

So my general question is - is ExtJs not compatible with utf8 or is there a trick to do this?

16 Aug 2007, 9:11 AM

I had issues with german umlauts and decided to go for UTF-8.
So anything is now UTF-8 and it works.
With "anything" i mean:
- OS on the server (linux)
- Setting in apache on the server
- Database on the server
- pages containing php, js and html are in UTF-8.

This way, i have no problems in Ext using Ajax or Forms.
Maybe you need to check your pages (textfiles).



16 Aug 2007, 9:17 AM
work #1 here with french accent

when i load json from php .. i encode my value with
utf8_encode in php

dont have any problems and have a lot of special char in the app.

16 Aug 2007, 11:06 PM
ok, the point i wonder about - generating normal content in php is no problem because i use utf8. Why have i to use utf8_encode ? Or is that a json_encode-problem?

Andreas Franke
14 Jul 2008, 5:19 AM
Why have i to use utf8_encode ?

I hope I'm not wrong, but I think that's the reason:

Since PHP is basically designed for ISO-8859-1, some multi-byte character encoding does not work well with PHP. (http://www-cgi.uni-regensburg.de/WWW_Server/Dokumentation/PHP/Manual-4.2.3-en/ref.mbstring.html)Another little hint. If your going to loose the