468,545 Members | 1,799 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,545 developers. It's quick & easy.

Greek encoding help wanted

PAN
I need some guidance here

I've written this HTML code using the Windows Notebook:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EL">
<html>
<head>
<title>This is a Greek language title -> καρυδάς πληροφορική</title>
</head>
<body>
<p>This is plain Greek text -> Θα είμαστε σύντομα κοντά σας</p>
</body>
</html>
and then I saved it as "index.html " in a local directory. The first time I
load the page in IE6.0-sp2 it came up with unreadable characters - in the
"Greek" text NOT the Latin characters - it came up with Turkish!!! encoding
so I had to disable this language support!. Ever since I was able to load
the page locally and had no problems.

Then I created the same page using a plain text editor in my Mandrake linux
8.2 PC and saved it in the "htdocs" dir of the Apache 2.0 server that I
installed. This PC is locally connected to other PCs that run on WinXP
Pro-sp2. When I access the web page from a Win PC, IE shows the page in
"Western Europe (ISO)" encoding making the page unreadable unless selecting
"Encoding=Greek (Windows) / (ISO)" through the menu option.

This is happening everytime I reload the page from the server. I tried using
CSS and define "lang" settings but had no results. W3 HTML 4.01 is an
excellent documentation but I feel I little bit lost there in the ISOs and
RFCs and have not enough time to figure out myself.

Whow can I overcome this problem? Is this an IE problem? an Apache server
problem? (the linux PC has NO support for Greek characters) Is this the
right group to ask?

I am quite experienced in Windows internals, also C,Pascal,VB etc. win
programmin and also, a newbbie++ in the linux world. :) and I have to teach
basic HTML page creation and uploading, in a classroom of 16-18yo students.
Thank you
Panagiotis C. Karydas
pk******@otenet.gr

PS. please forgive any bad-english writing...
Jul 23 '05 #1
9 13918
"PAN" <pk******@otenet.gr> wrote:
I've written this HTML code using the Windows Notebook: - - and then I saved it as "index.html " in a local directory. The
first time I load the page in IE6.0-sp2 it came up with unreadable
characters
That's not a big surprise, since the document does not specify its own
encoding (in a <meta> hack) _and_ it is not sent via HTTP so there are
no HTTP headers that the browser could use to find the encoding.
So the browser is more or less forced to guess. It guesses wrong for
some reason.
- - so I had to disable this language
support!. Ever since I was able to load the page locally and had no
problems.
Interesting, but not really a solution.

For local viewing, <meta http-equiv="Content-Type" content=
"text/html;charset=iso-8859-7"> is useful.

For a document uploaded onto a Web server, the server should be
configured to send the appropriate charset information; for a demo
if this in action, see
http://www.cs.tut.fi/~jkorpela/test/greek.iso7
(which should display the Greek text irrespectively of your browser
settings, unless you set the browser to override the character encoding
information sent by a server).
- - saved it in the "htdocs" dir of the
Apache 2.0 server that I installed.
On Apache, you should be able to use the .htaccess file to set the
encoding information sent by the browser.

Whether you use both that method (for actual genetating HTTP headers)
and the <meta> tag is somewhat debatable, and debated, here. And it's
hard to tell what you should teach about this to students. In practice,
the <meta> tag is easier to people to grasp and works sufficiently well
_if_ the server does not send HTTP headers that conflict with it.
But if it does, then those headers take precedence (both by the specs
and in actual browser behavior), so the default configuration of the
server is relevant.
When I access the web page
from a Win PC, IE shows the page in "Western Europe (ISO)" encoding
making the page unreadable unless selecting "Encoding=Greek
(Windows) / (ISO)" through the menu option.
That's typical when the encoding information is not specified on the
page itself or in the HTTP headers.
I tried using CSS and define "lang" settings but had no results.


CSS isn't really relevant here. The "lang" attribute is useful in
principle for other reasons, but doesn't affect the encoding issue.

You might benefit from some version of my document
"Using national and special characters in HTML",
http://www.cs.tut.fi/~jkorpela/html/chars
though unfortunately the Greek version
http://www.cs.tut.fi/~jkorpela/html/chars.iso7
is old - I have had no resources for maintaining it; the English
version
http://www.cs.tut.fi/~jkorpela/html/chars.html
is the most up-to-date (which isn't as up-to-date as I'd like to).

Regarding the different encodings used for Greek, I've mostly forgotten
the details, but in some cases it is relevant whether you specify
ISO-8859-7 or windows-1253, since they differ in a few positions, see
http://www.cs.tut.fi/~jkorpela/unicode/greek.html
Any Windows software that you use for writing in Greek probably uses
the Microsoft-defined encoding, windows-1253.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 23 '05 #2
On Wed, 22 Dec 2004, PAN wrote:
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
You need to set up your newsreader^W Outlook Express correctly
in order to transmit special, non-ASCII characters:

Tools > Options > Send
Mail Sending Format > Plain Text Settings > Message format MIME
News Sending Format > Plain Text Settings > Message format MIME
Encode text using: None

If you cannot even write Greek in Outlook Express, don't expect
configuring a webserver correctly.
I've written this HTML code using the Windows Notebook:
Please don't post your code here - supply a URL!
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EL"> ^^
No such thing! It must be "EN" instead of "EL".
<p>This is plain Greek text -> ?? ??????? ??????? ????? ???</p>
See above!
When I access the web page from a Win PC,
Give URL!
W3 HTML 4.01 is an
excellent documentation but I feel I little bit lost there in the ISOs and
RFCs and have not enough time to figure out myself.
I suggest reading
http://ppewww.ph.gla.ac.uk/~flavell/charset/checklist ,
especially
http://ppewww.ph.gla.ac.uk/~flavell/...t/checklist#s4
and also
http://ppewww.ph.gla.ac.uk/~flavell/...t/ns-burp.html
http://www.w3.org/International/O-HTTP-charset.html
for server settings.

A sample Greek text is
http://www.unics.uni-hannover.de/nhtcapri/greek.html7
together with the line
AddType text/html;charset=ISO-8859-7 html7
in my .htaccess file. This means that the encoding (charset)
is set to Greek ISO-8859-7.
(the linux PC has NO support for Greek characters)
I cannot believe this. Perhaps you haven't found it yet?
Is this the right group to ask?
For authoring, yes. You might consider also
<news:comp.infosystems.www.servers.ms-windows>
<news:comp.infosystems.www.servers.unix>
for server questions.
PS. please forgive any bad-english writing...


Never mind! English is a foreign language in most parts of the worlds:
in Continental Europe, in Asia, in Africa, in the Americas.

Jul 23 '05 #3
PAN
Thank you Jukka

Your remarks AND links are very helpful.
For local viewing, <meta http-equiv="Content-Type" content=
"text/html;charset=iso-8859-7"> is useful.


I have already used a statement like the above (also replacing "iso-8859-7"
with "windows-1253") but had no results. But I believe this is a matter of
the server configuration. I will study further and come up again if needed.

Thanks again

Panagiotis C. Karydas

Jul 23 '05 #4
PAN
Thank you Andreas for your remarks and links. I will study them carefully.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EL">

^^
No such thing! It must be "EN" instead of "EL".


Why so? According to ISO 639 the greek language code is EL. Is it wrong to
write it this way?

Panagiotis C. Karydas

Jul 23 '05 #5

"PAN" <pk******@otenet.gr> wrote in message
news:cq**********@usenet.otenet.gr...
Thank you Jukka

Your remarks AND links are very helpful.
For local viewing, <meta http-equiv="Content-Type" content=
"text/html;charset=iso-8859-7"> is useful.
I have already used a statement like the above (also replacing

"iso-8859-7" with "windows-1253") but had no results. But I believe this is a matter of
the server configuration. I will study further and come up again if

needed.

When you open a file locally, there *is* no server.

Jul 23 '05 #6

"PAN" <pk******@otenet.gr> wrote in message
news:cq**********@usenet.otenet.gr...
Thank you Andreas for your remarks and links. I will study them carefully.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EL">

^^
No such thing! It must be "EN" instead of "EL".


Why so? According to ISO 639 the greek language code is EL. Is it wrong to
write it this way?


Yes, since the DTD isn't in Greek.

Jul 23 '05 #7
On Wed, 22 Dec 2004 20:58:07 +0200, "PAN" <pk******@otenet.gr> wrote:
Thank you Andreas for your remarks and links. I will study them carefully.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EL">

^^
No such thing! It must be "EN" instead of "EL".


Why so? According to ISO 639 the greek language code is EL.
Is it wrong to write it this way?


Yes it's wrong. That very last part of the 'PUBLIC' identifier is there
to say what language that is used in the entity that corresponds to the
maybe 'PUBLIC' entity you want to refer to :-)

--
Rex
Jul 23 '05 #8
"Harlan Messinger" <h.*********@comcast.net> wrote:
>> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EL"> ^^ No such
>> thing! It must be "EN" instead of "EL".


Why so? According to ISO 639 the greek language code is EL. Is it
wrong to write it this way?


Yes, since the DTD isn't in Greek.


Indeed, despite the fact that after taking a look at HTML DTDs, many
people have shouted "this is all Greek to me!". :-)

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 23 '05 #9
On Wed, 22 Dec 2004, I wrote:
A sample Greek text is
http://www.unics.uni-hannover.de/nhtcapri/greek.html7


http://validator.w3.org/ fails on character xA4 (euro sign)
of ISO-8859-7:2003.

Jul 23 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

27 posts views Thread by alexdoulou | last post: by
1 post views Thread by interuser | last post: by
4 posts views Thread by Giannis Vrentzos | last post: by
8 posts views Thread by =?gb2312?B?yMvR1MLkyNXKx8zs0cSjrM37vKvM7NHEsru8+7z | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.