By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,640 Members | 1,672 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,640 IT Pros & Developers. It's quick & easy.

Eclipse, charset and PHP

P: n/a
Hello,

I'm trying to internationalize 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
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Thu, 8 Apr 2004 09:48:31 -0400, "Marko" <m_*******@hotmail.com> wrote:
I'm trying to internationalize 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?


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 <an**@andyh.co.uk> / Space: disk usage analysis tool
http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
Jul 17 '05 #2

P: n/a
Andy Hassall <an**@andyh.co.uk> wrote:
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.


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

Jul 17 '05 #3

P: n/a
On Thu, 8 Apr 2004 09:48:31 -0400, Marko wrote:
I'm trying to internationalize 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?


Window->Preferences->Workbench->Editors-> Text file encoding.
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.