Eclipse, charset and PHP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marko

    Eclipse, charset and PHP

    Hello,

    I'm trying to internationaliz e my PHP code, but some of the ISO-8859-2
    characters don't show in the browser. I'm namely trying to use Croatian and
    Russian, and some of the characters show and most don't. I did the header
    (that's the one for Croatian)

    header("Content-Type: text/html; charset=iso-8859-2");

    but it doesn't work. When I type my strings in Eclipse it is all fine and I
    see all the characters that I want. Is it maybe an Eclipse setting I need to
    worry about? What am I missing? It is not the browser, as I can see all the
    Croatian/Russian pages just fine. Server maybe?

    Thanks,

    Marko


  • Andy Hassall

    #2
    Re: Eclipse, charset and PHP

    On Thu, 8 Apr 2004 09:48:31 -0400, "Marko" <m_bukovac@hotm ail.com> wrote:
    [color=blue]
    >I'm trying to internationaliz e my PHP code, but some of the ISO-8859-2
    >characters don't show in the browser. I'm namely trying to use Croatian and
    >Russian, and some of the characters show and most don't. I did the header
    >(that's the one for Croatian)
    >
    >header("Conten t-Type: text/html; charset=iso-8859-2");
    >
    >but it doesn't work. When I type my strings in Eclipse it is all fine and I
    >see all the characters that I want. Is it maybe an Eclipse setting I need to
    >worry about? What am I missing? It is not the browser, as I can see all the
    >Croatian/Russian pages just fine. Server maybe?[/color]

    Please define "doesn't work" - this is not a helpful description.

    There are many different sorts of "not workingness"; describe what happens and
    how it differs from what you expected.

    You suggest blaming the server, but you haven't said which one it is. As far
    as I know, Apache doesn't involve itself in character set conversions, so if
    you're using that it's unlikely to be the server. Might not apply if you're
    using another server.

    I'm not familiar with Eclipse other than having heard what it is, so can't
    comment on what encoding it is using. I wouldn't be surprised if it is using
    UTF-8 though. But more information is definitely required.

    --
    Andy Hassall <andy@andyh.co. uk> / Space: disk usage analysis tool
    http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space

    Comment

    • Daniel Tryba

      #3
      Re: Eclipse, charset and PHP

      Andy Hassall <andy@andyh.co. uk> wrote:[color=blue]
      > I'm not familiar with Eclipse other than having heard what it is, so can't
      > comment on what encoding it is using. I wouldn't be surprised if it is using
      > UTF-8 though. But more information is definitely required.[/color]

      Ecipse is java. Strings are internally handled as UCS-2. Files are
      handled according to the file.encoding (or something like that)
      property, transaltion can go wrong here. The OP shoiuld take a decent
      editor an fidn out hwat is stored in the file itself.

      --

      Daniel Tryba

      Comment

      • Tomislav Filipèiæ

        #4
        Re: Eclipse, charset and PHP

        On Thu, 8 Apr 2004 09:48:31 -0400, Marko wrote:
        [color=blue]
        > I'm trying to internationaliz e my PHP code, but some of the ISO-8859-2
        > characters don't show in the browser. I'm namely trying to use Croatian and
        > Russian, and some of the characters show and most don't. I did the header
        > (that's the one for Croatian)
        >
        > header("Content-Type: text/html; charset=iso-8859-2");
        >
        > but it doesn't work. When I type my strings in Eclipse it is all fine and I
        > see all the characters that I want. Is it maybe an Eclipse setting I need to
        > worry about? What am I missing? It is not the browser, as I can see all the
        > Croatian/Russian pages just fine. Server maybe?[/color]

        Window->Preferences->Workbench->Editors-> Text file encoding.

        Comment

        Working...