Mar 29

First you need to specify character set for HTML output.. in your page header add:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

in PHP you can use (this line must be firstĀ in your code):

<?php header("Content-type: text/html; charset=utf-8");?>

then you need to write a .htaccess in your root dir of your website:

# Set httpd charset to utf-8
AddDefaultCharset On
AddDefaultCharset utf-8
# Set php charset to utf-8 and setup mbstring (you may need to install mbstring module)
php_value default_charset utf-8
php_value mbstring.internal_encoding utf-8
php_value mbstring.func_overload 7

 

more info for romanian users at:
http://www.webdesignbox.ro/utf-8-in-paginile-web-diacritice-caractere-speciale-suport-multilingv

written by MG \\ tags: , , ,


Leave a Reply

*