I am trying to set my site's encoding to UTF-8 but I fail. Environment: Ubuntu Desktop 13.04, Apache 2.2, PHP+FPM. Added a .htacces: AddDefaultCharset UTF-8
Meta:
file -bi * output: inode/directory; charset=binary inode/directory; charset=binary text/html; charset=utf-8 inode/directory; charset=binary inode/directory; charset=binary text/x-php; charset=utf-8 inode/directory; charset=binary text/x-php; charset=us-ascii inode/directory; charset=binary text/x-php; charset=us-ascii
(similar in subdirectories)
System encoding is also UTF-8.
PHP header: header("Content-Type:text/html;charset=UTF-8");
The problem itself:
When I echo accent letters like this: echo "ÁÁÁ
\n"; it prints out them well. But when I send these letters through a post form, they become these: �
Maybe my browsers encoding messes up everything? I really hope no, because everything is on default. Anyway, w3c validator says it is a valid HTML5 UTF-8 encoded page.
A hope anyone can help me. Thanks in advance.