From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "spamfilteraccount@gmail.com" Newsgroups: gmane.emacs.help Subject: Opening file in UTF-8 mode automatically Date: Sat, 24 Nov 2007 08:38:20 -0800 (PST) Organization: http://groups.google.com Message-ID: <78b46aa5-064f-4977-b425-b30a2f1866bb@a39g2000pre.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1195922477 8998 80.91.229.12 (24 Nov 2007 16:41:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Nov 2007 16:41:17 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 24 17:41:25 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 1Ivy4J-0007lX-4H for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Nov 2007 17:41:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ivy44-0002Uv-G8 for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Nov 2007 11:41:08 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!a39g2000pre.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 13 Original-NNTP-Posting-Host: 81.182.19.38 Original-X-Trace: posting.google.com 1195922300 30730 127.0.0.1 (24 Nov 2007 16:38:20 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sat, 24 Nov 2007 16:38:20 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: a39g2000pre.googlegroups.com; posting-host=81.182.19.38; posting-account=ksnUxwoAAAC32CfuC8oi8NKZxrTcNtdm User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9,gzip(gfe),gzip(gfe) Content-Disposition: inline Original-Xref: shelby.stanford.edu gnu.emacs.help:154042 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:49474 Archived-At: I need to edit some UTF-8 files and it's very annoying emacs doesn't detect it automatically (I have to reopen them as utf-8 manually) and sometimes I notice it only after I already edited and saved the file which messes up the formatting. I tried prefer-coding-system utf-8, but it didn't help. I can't put lisp code into the files, because they are data files. Is there a definitive way to do it? The BOM is at the beginning of the files, so Emacs could detect it automatically. It's emacs 22.