Reply to Re: php script encoding

Your name:

Reply:


Posted by Andy Hassall on 11/11/06 16:09

On 11 Nov 2006 05:34:37 -0800, "Schups@gmail.com" <Schups@gmail.com> wrote:

>this is my first "topic" on Google Groups.
>
>I'm looking for a solution for 4 days, without results.
>
>So... my apache is serving pages in UTF-8 but my php scripts are writed
>(I'm speaking about strings) in ISO-8859-1.
>
>How can I say at apache how to interpret my scripts in a different
>charset?
>
>I don't want to change every "è" with "&egrave;"
>I think that it should be a simple configuration in the .conf or in the
>.ini but... nothig found about.

The character set that the browser uses to interpret the data is sent along
with the Content-type header.

(1) Override the header with:

header('Content-type: text/html; charset=iso-8859-1');

http://uk2.php.net/header

and/or:

(2) Check whether default_charset is set in php.ini

http://uk2.php.net/manual/en/ini.core.php#ini.default-charset

It may be more suitable to change this instead, but it depends on your setup.

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

[Back to original 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

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