I have a LDAP installed on Ubuntu 14.04. My webpage is UTF-8 but I have problems when retrieving data from a form. When I submit a form that contains characters like 'ñ' or 'é' and I print the $_POST var the data I submited is corrupted because of a encoding mismatch as I undersand.
I have read a lot of tutorials and I have done everything I have found. This is how looks my** nginx.conf** now:
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
charset utf-8; <---- This should be the fix --->
.... other things
Should I modify de sites-enabled/default also? ( It doesn't change the result anyway )
This is the** headers,** from wget -S
HTTP/1.1 200 OK
Server: nginx/1.4.6 (Ubuntu)
Date: Thu, 31 Jul 2014 16:41:36 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/5.5.9-1ubuntu4.3
The only way around for making it work was setting accept-charset="ISO-8859-1" in the form tag, but this is not a solution because doesn't work in IE and my web is a little more than a form.