473,480 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

php script encoding

Hi everyone,
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 "è"
I think that it should be a simple configuration in the .conf or in the
..ini but... nothig found about.
Help

Nov 11 '06 #1
3 1391

Sc****@gmail.com wrote:
Hi everyone,
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 "è"
I think that it should be a simple configuration in the .conf or in the
.ini but... nothig found about.
Help

Hi :
I think that u must the modify the "Collation" (charset) of the table
which u use :
if u use PHPMYADMIN after u select the table :
from >operationsCollation : then set the charst u wnat :)

Nov 11 '06 #2
On 11 Nov 2006 05:34:37 -0800, "Sc****@gmail.com" <Sc****@gmail.comwrote:
>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.cor...efault-charset

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

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Nov 11 '06 #3

"Sc****@gmail.com дµÀ£º
"
Hi everyone,
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.
Help
and you can set apache like this:

AddDefaultCharset "ISO-8859-1"

add this line into your http.conf file.

Nov 12 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

24
5007
by: Yang Li Ke | last post by:
Hi guys! Anyone know a way so that users purchasing my scripts would not be able to share them with other people ? Yang
2
3312
by: Web Master | last post by:
Hi, I am having a little issue with Jacks Form mail php script. I have installed it and configured the form to get it to work, but for some bizarre reason I have 2 issues I can't seem to debug....
2
6658
by: Victor | last post by:
Hi, I have a problem with logging into web site via screen scraping. User name and password field contain 'name' property, and therefore I can easily do assignment to them:...
2
3501
by: Thomas W | last post by:
I'm trying to wrap my head around the docs at python.org related to the gettext-module, but I'm having some problem getting it to work. Is there any really simple, step-by-step on how to use this...
4
3055
by: Kim | last post by:
Random image downloader for specified newsgroup. Hi I'm writing a small script that will download random images from a specified newsgroup. I've imported yenc into the script but I can't open the...
0
1507
by: brakesh | last post by:
Hi, I am trying to call a perl program (that connects a webserver database) from a php program via a webbrowser. For example : http://development.noaa.gov/test_exec.php?dataid=8313. The...
0
1609
by: matej | last post by:
Hi, I am writing a script to convert couple of thousand emails (in couple of hundred folders) and before I will get to the hard part -- maintaing structure folders and subfolders, and maintaing...
20
2018
by: weheh | last post by:
Dear web gods: After much, much, much struggle with unicode, many an hour reading all the examples online, coding them, testing them, ripping them apart and putting them back together, I am...
3
7851
by: Abhinavnaresh | last post by:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. ...
2
1814
chunk1978
by: chunk1978 | last post by:
i wrote a custom PHP script last year and everything worked perfectly... recently my webserver upgraded to PHP 5 and now my script doesn't work properly. what the script does is: users fill out...
0
7037
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6904
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7076
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6730
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6873
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5321
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4471
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1294
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.