Re: [HAB] Force Browsers to encode in utf8

From: Date: Thu, 13 Jan 2005 21:31:26 +0000
Subject: Re: [HAB] Force Browsers to encode in utf8
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-206324@lists.php.net to get a copy of this message
OOzy Pal wrote:
Dears, My html templates are encoded using utf-8. When the browser reads the files as .html it encodes it fine and my characters looks fine. However, when php reads the files and sends them to the browser the files looks ugly and unreadable. How can I force the broswer to encode the pages in utf-8.
does it help if you add the following statement to your php file(s): header("Content-Type: text/plain; charset=UTF-8"); the call to header must occur before any output is done. also you may wish to investigate the usage of (and your current settings of) the follow ini settings: mbstring.internal_encoding mbstring.encoding_translation mbstring.internal_encoding default_charset I don't profess to have a good grip on charsets/encoding/transcoding etc and I've yet to find an article that I can get my head round... can anyway out there confess to actually understanding this stuff - Im very interested!
===== Regards, OOzy What is the purpose of life? does there need to be a purpose?


« previous php.general (#206324) next »