help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

display of ancient Greek chars (after: Re: set UTF-8 for a file (HTML))


From: ken
Subject: display of ancient Greek chars (after: Re: set UTF-8 for a file (HTML))
Date: Sun, 10 Feb 2008 15:09:59 -0500
User-agent: Thunderbird 2.0.0.0 (X11/20070326)

On 02/10/2008 04:04 AM Harald Hanche-Olsen wrote:
+ ken <address@hidden>:

I'm editing an HTML file (in emacs, of course) and want to preserve
the utf-8 encoding when the file is opened in subsequent sessions.  I
know I can put a line at the top of the file which will set a variable
in emacs whenever the file is opened.  So what should this line say to
specify that the file is encoded in utf-8?

If you're using HTML mode, just specifying

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

in the head element of the file should do it.

Otherwise, a generic method for specifying the coding to emacs is
having -*- coding: utf-8 -*- in the first line of the file.  You should
typically protect that by putting in a comment, as follows:

<!-- -*- coding: utf-8 -*- -->


Thanks, Harald and Peter,

The above is perfect.  On to the subsequent issue....

Prior to doing the above I somehow managed to figure out how to insert a word in Greek into my HTML file and have it display properly both in emacs and in the web browser. (This required (1) setting the keyboard for inputting Greek and (2) setting some emacs display variable, which I no longer recall, also to Greek.) Though both the Greek and the English displayed correctly in emacs when first typed in, after reloading the file specifying utf-8, the Greek characters now display in emacs as a series of little rectangles. (They still display fine in the web browser.)

Is there another variable:value pair I can include in the first line (specified above) to make the Greek characters display correctly in emacs?


Much appreciated.


--
The significant problems we face cannot be solved at the
same level of thinking we were at when we created them.
        -- Albert Einstein





reply via email to

[Prev in Thread] Current Thread [Next in Thread]