Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- php script encoding
November 11, 2006, 1:34 pm
rate this thread
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
I don't want to change every "è" with "è"
I think that it should be a simple configuration in the .conf or in the
.ini but... nothig found about.
Re: php script encoding
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');
(2) Check whether default_charset is set in php.ini
It may be more suitable to change this instead, but it depends on your setup.
Andy Hassall :: email@example.com :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool