[eluser]Ñuño Martínez[/eluser]
Hello.
This is not CodeIgniter related topic but I think somebody can help.
We're working in a web application and we're having problems with character encoding. The server is Apache+PHP5+MySQL in a Debian (with CodeIgniter installed, of course
). I'm using a Xubuntu with everything (including editors) configured to use UTF-8 as default, the other developer is using Windows (AFAIK ISO-8859-1) and we have a SVN system on the Debian server. CodeIgniter was initially configured to set the UTF-8 encoding in headers as well.
When we start testing we had a first problem with JavaScript. JS doesn't understand about &html; entities so here start the problems (we're Spanish and characters as "áéíóúñ..." are quite common) because the "alert" function doesn't show the correct characters on Windows systems. We have also problems with the database because it stored the data using UTF-8 but Apache sends the responses as it where ISO-8859-1 making it unreadable.
Then we decide to change the codification of all PHP and JS sources to ISO-8859-1 and reconfigure CodeIgniter to put it in the headers just because it seems like that is the codification used by Apache to send the data. Now the behavior is more bizarre. Sometimes it shows the text correctly, sometimes shows the same text bad and I can't see why. It seems arbitrary. :-S By the way I've check the request headers and they're using always UTF-8 (even in Windows IE :ohh: ) despite the encoding I requested or the one used by the web page, the client OS or the browser.
The guy who manages the server tells me everything is correctly configured but I'm not sure at all and I can't check it (I have no idea about how to configure a server or a database. I tried to learn it but I think it's beyond my capabilities :red: ).
I have no idea what we're doing wrong. Is it CodeIgniter's fault? Is it XMLHttpRequest object's fault? Is it Apache's fault? What should I check? What should we change? I'm confused...