You are here: Re: [PHP] [HAB] Force Browsers to encode in utf8 « PHP « IT news, forums, messages
Re: [PHP] [HAB] Force Browsers to encode in utf8

Posted by Jochem Maas on 01/13/05 23:31

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?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация