PDA

View Full Version : utf8 - again


steffenk
08-16-2007, 12:05 PM
Hi,
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?

Wolfgang
08-16-2007, 12:11 PM
Hello,

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).

Regards

Wolfgang

Grimsk
08-16-2007, 12:17 PM
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.

steffenk
08-17-2007, 02:06 AM
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
07-14-2008, 08: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