From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Benjamin Riefenstahl Newsgroups: gmane.emacs.devel Subject: Re: Detecting BOM for UTF files Date: Wed, 15 Oct 2003 17:20:16 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <1B6B4E43-FF20-11D7-BEA9-000393861220@sage.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1066231397 22028 80.91.224.253 (15 Oct 2003 15:23:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Oct 2003 15:23:17 +0000 (UTC) Cc: emacs-devel Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Oct 15 17:23:15 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A9nUZ-0007H7-00 for ; Wed, 15 Oct 2003 17:23:15 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1A9nUZ-00012Z-00 for ; Wed, 15 Oct 2003 17:23:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A9nTr-0004yN-59 for emacs-devel@quimby.gnus.org; Wed, 15 Oct 2003 11:22:31 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1A9nTU-0004v2-Kn for emacs-devel@gnu.org; Wed, 15 Oct 2003 11:22:08 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1A9nSw-0004ZO-RR for emacs-devel@gnu.org; Wed, 15 Oct 2003 11:22:06 -0400 Original-Received: from [193.28.100.164] (helo=mail.epost.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A9nSw-0004Vt-1x for emacs-devel@gnu.org; Wed, 15 Oct 2003 11:21:34 -0400 Original-Received: from seneca.benny.turtle-trading.net.epost.de (193.99.153.30) by mail.epost.de (6.7.015) id 3F8A92F1000443F1; Wed, 15 Oct 2003 17:21:32 +0200 Original-To: =?iso-8859-1?q?S=E9bastien?= Kirche In-Reply-To: <1B6B4E43-FF20-11D7-BEA9-000393861220@sage.com> =?iso-8859-1?q?(S=E9bastien?= Kirche's message of "Wed, 15 Oct 2003 16:58:59 +0200") User-Agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17118 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17118 Hi S=E9bastien, > Andreas Schwab a =E9crit : > >> ??? UTF-8 does not need a BOM, it's an 8-bit encoding. S=E9bastien Kirche writes: > Mmmh, FAQ of Unicode.org explains that there exists one BOM for > UTF-8 too : There is no contradiction. You *can* add a BOM to UTF-8 text, it just doesn't serve a purpose, because UTF-8 doesn't have a "byte order" to mark. In addition, the BOM makes text manipulation more difficult, so it is actually not recommended by the Unicode standard. > Anyway, do I have to understand that it isn't poosible to guess type > without BOM ? No. Current versions of Emacs can handle UTF-8 automatically without additional packages. You just have to configure it right. Have a look at the function prefer-coding-system. If you have further questions, you should probably post them to an Emacs user list or newsgroup like comp.emacs. benny