php script encoding

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Schups@gmail.com

    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

  • Beshoo

    #2
    Re: php script encoding


    Schups@gmail.co m 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 >operationsColl ation : then set the charst u wnat :)

    Comment

    • Andy Hassall

      #3
      Re: php script encoding

      On 11 Nov 2006 05:34:37 -0800, "Schups@gmail.c om" <Schups@gmail.c omwrote:
      >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');



      and/or:

      (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 :: andy@andyh.co.u k :: http://www.andyh.co.uk
      http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

      Comment

      • feelinglucky

        #4
        Re: php script encoding


        "Schups@gmail.c om дµÀ£º
        "
        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:

        AddDefaultChars et "ISO-8859-1"

        add this line into your http.conf file.

        Comment

        Working...