View Single Post
  #5  
Old 11-10-2012, 03:24 AM
LiteSpeeder LiteSpeeder is offline
Senior Member
 
Join Date: Nov 2008
Posts: 65
Hmm, this worked. However, what i'm trying to achive is to set default encoding to UTF-8.

I created two files; "test.php" and "test.js" in /test/. The content is "This is a test file".

Server header check gives:

HTTP/1.0 200 OK =>
Date => Sat, 10 Nov 2012 11:18:46 GMT
Connection => close
X-Powered-By => PHP/5.2.16
Content-Type => text/html; charset=ISO-8859-9
Content-Length => 28

Adding the lines below to .htaccess do not make any differences:

AddDefaultCharset UTF-8

<filesMatch "\.(htm|html|css|js)$">
ForceType 'text/html; charset=UTF-8'
</filesMatch>

<filesMatch "\.(htm|html|css|js)$">
AddDefaultCharset UTF-8
</filesMatch>

AddCharset UTF-8 .html .php .js


I am aware that the default encoding in php.ini is set to ISO-8859-9 but it must be possible to override this value.

Last edited by LiteSpeeder; 11-10-2012 at 03:34 AM..
Reply With Quote