From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Harald Hanche-Olsen Newsgroups: gmane.emacs.help Subject: Re: latex files encoding Date: Fri, 10 Aug 2007 12:33:15 +0200 Organization: Norwegian university of science and technology Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1186742435 22348 80.91.229.12 (10 Aug 2007 10:40:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 10 Aug 2007 10:40:35 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 10 12:40:32 2007 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 1IJRux-0005Z3-TQ for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Aug 2007 12:40:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IJRux-00009A-Dl for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Aug 2007 06:40:31 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!goblin1!goblin.stu.neva.ru!uio.no!ntnu.no!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 39 Original-NNTP-Posting-Host: fiinbeck.math.ntnu.no Original-X-Trace: orkan.itea.ntnu.no 1186741995 29763 129.241.15.140 (10 Aug 2007 10:33:15 GMT) Original-X-Complaints-To: usenet@itea.ntnu.no Original-NNTP-Posting-Date: Fri, 10 Aug 2007 10:33:15 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (berkeley-unix) Cancel-Lock: sha1:U9bxrSTh5hJZgG11yGdpF4nPsgI= Original-Xref: shelby.stanford.edu gnu.emacs.help:150889 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:46464 Archived-At: + Alain Muls : | I have numerous latex files I created using kile. The encoding is (I | think) sat to UTF-8 or UTF-16. Since I like auctex, reftex, etc I | decided to return to emacs, an editor I used until 2 years ago. | | Now I have a problem with the encoding of these files. As an example, | the ë (e diacritic ?) is shown as ï. How can I get emacs to respect | the encoding of the files. The hard way: Type C-x C-m c and specify utf-8 for the coding system, and immediately follow this by C-x C-f to find the file. The easy way: Put a comment on the first line of your latex files: % -*- coding: utf-8; -*- If you want the utf-8 encoding on every tex file you can do something like (push '("[.]tex$" . utf-8) file-coding-system-alist) (er, push is part of the cl package, so you need (require 'cl) first, or rewrite to the equivalent non-cl elisp - which I admit I am too lazy to figure out right now). You can still override that with C-x C-m c if you encounter a non-utf-8 latex file. And finally, you can convert your utf-8 encoded tex files to latin-1 (if possible) by first reading them after using C-x C-m c utf-8 RET and then changing the coding system using C-c C-m f and specifying latin-1, whereupon you save the file. (You'd better edit the \usepackage[...]{inputenc} in the source file accordingly.) -- * Harald Hanche-Olsen - It is undesirable to believe a proposition when there is no ground whatsoever for supposing it is true. -- Bertrand Russell