I have a self-hosted server running nginx and PHP5-fpm on a debian (raspbian wheezy) machine.
My problem is UTF-8 special characters (åäö) aren't working. I've set <meta charset="utf-8">
in the head of the website. All files are encoded with utf-8 without BOM.
As adviced by Fleshgrinder's answer I've added charset utf-8;
to nginx.conf without results.
How can I fix this?
Your files must be in UTF-8 as well and the HTTP header you send is more important than the meta tag.
To deliver all your content with UTF-8 encoding (HTTP header) via nginx do the following:
# /etc/nginx/nginx.conf
http {
charset utf-8;
}
But the important part is that your files actually have to be encoded in UTF-8 for anything to work. A good editor (e.g. Notepad2, Notepad++, NetBeans IDE, Adobe Dreamweaver, …) allows you to change the encoding of your file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With