From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ken Newsgroups: gmane.emacs.help Subject: display of ancient Greek chars (after: Re: set UTF-8 for a file (HTML)) Date: Sun, 10 Feb 2008 15:09:59 -0500 Message-ID: <47AF5A17.4090709@speakeasy.net> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1202674254 8393 80.91.229.12 (10 Feb 2008 20:10:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Feb 2008 20:10:54 +0000 (UTC) To: GNU Emacs List Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 10 21:11:17 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JOIWB-00035X-66 for geh-help-gnu-emacs@m.gmane.org; Sun, 10 Feb 2008 21:11:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOIVh-0008Uz-Tc for geh-help-gnu-emacs@m.gmane.org; Sun, 10 Feb 2008 15:10:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JOIVQ-0008TU-PU for help-gnu-emacs@gnu.org; Sun, 10 Feb 2008 15:10:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JOIVO-0008Rv-Pq for help-gnu-emacs@gnu.org; Sun, 10 Feb 2008 15:10:28 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOIVO-0008Rl-MJ for help-gnu-emacs@gnu.org; Sun, 10 Feb 2008 15:10:26 -0500 Original-Received: from mail8.sea5.speakeasy.net ([69.17.117.10]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JOIVO-0004dS-Iq for help-gnu-emacs@gnu.org; Sun, 10 Feb 2008 15:10:26 -0500 Original-Received: (qmail 14311 invoked from network); 10 Feb 2008 20:10:24 -0000 Original-Received: from dsl093-011-017.cle1.dsl.speakeasy.net (HELO [192.168.0.26]) (gebser@[66.93.11.17]) (envelope-sender ) by mail8.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 10 Feb 2008 20:10:24 -0000 User-Agent: Thunderbird 2.0.0.0 (X11/20070326) In-Reply-To: X-Enigmail-Version: 0.95.6 OpenPGP: id=45796D04 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:51404 Archived-At: On 02/10/2008 04:04 AM Harald Hanche-Olsen wrote: > + ken : > >> 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 > > > > 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: > > > 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