From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.help Subject: Re: Opening file in UTF-8 mode automatically Date: Sat, 24 Nov 2007 19:38:45 +0100 Organization: T-Online Message-ID: References: <78b46aa5-064f-4977-b425-b30a2f1866bb@a39g2000pre.googlegroups.com> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1195929643 29108 80.91.229.12 (24 Nov 2007 18:40:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Nov 2007 18:40:43 +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 19:40:50 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 1Ivzvo-0000cU-UE for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Nov 2007 19:40:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ivzva-00033O-CG for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Nov 2007 13:40:30 -0500 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newsfeed.esat.net!club-internet.fr!feedme-small.clubint.net!news.germany.com!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 29 Original-X-Trace: news.t-online.com 1195929546 01 7123 Mpyf1ABlxNoYedf 071124 18:39:06 Original-X-Complaints-To: usenet-abuse@t-online.de X-ID: bVX+lrZF8eBqsiOoxZ00p0GC+vcqIYJoiVHyCWj+aXniyCQQMOsj6C X-Face: 'bg&jY[8V'W&:=~6w"|>}#4/T; w~36ei4NNMyKRR.a$n=$|sWFPF1y]a\>6kc\*#GN]UDM| Ywv, vbL^XF1nIp\:F=$Ei2o&mEe:%N~, :3]vtQ~s9u$9izmX$IF@VgGl7/, ^dbuM<3|AO2}.%|%?kZ 2Y=@\U!~cll^=8Z9ihKq%wmUe1Ky(#kl3T'>Qk0Ia3mCBsTk?E(,X Mail-Copies-To: nobody User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:9kLpgGUlmEhUaBUQmrUKAwmGi0c= Original-Xref: shelby.stanford.edu gnu.emacs.help:154047 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:49479 Archived-At: On Sat, Nov 24 2007, spamfilteraccount@gmail.com wrote: > 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. `auto-coding-regexp-alist' in Emacs 22 already has an entry for the BOM: ("\\`\xEF\xBB\xBF" . utf-8). Either you have removed this entry or there is a bug. If the latter, please report it as a bug (M-x report-emacs-bug RET) along with a small gzipped sample document and a recipe starting from "emacs -Q" to reproduce the problem. Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/