"PAN" <pkarydas@otenet.gr> wrote:
[color=blue]
> I've written this HTML code using the Windows Notebook:[/color]
- -[color=blue]
> 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[/color]
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.
[color=blue]
> - - so I had to disable this language
> support!. Ever since I was able to load the page locally and had no
> problems.[/color]
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).
[color=blue]
> - - saved it in the "htdocs" dir of the
> Apache 2.0 server that I installed.[/color]
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.
[color=blue]
> 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.[/color]
That's typical when the encoding information is not specified on the
page itself or in the HTTP headers.
[color=blue]
> I tried using CSS and define "lang" settings but had no results.[/color]
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