From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: byte-order marks Date: Tue, 29 Jan 2013 21:52:23 +0100 Message-ID: <87d2wnlnjs.fsf@gnu.org> References: <87boc956j2.fsf@pobox.com> <87y5fcjt52.fsf@tines.lan> <87vcag4azz.fsf@pobox.com> <87a9rsm85s.fsf@gnu.org> <87k3qw2ii1.fsf@pobox.com> <87txpzkjaf.fsf@tines.lan> <87mwvrkdr7.fsf@tines.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1359498080 28992 80.91.229.3 (29 Jan 2013 22:21:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Jan 2013 22:21:20 +0000 (UTC) Cc: Andy Wingo , guile-devel@gnu.org To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Jan 29 23:21:39 2013 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U0JYe-00054O-T3 for guile-devel@m.gmane.org; Tue, 29 Jan 2013 23:21:37 +0100 Original-Received: from localhost ([::1]:60258 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0JYM-0007Rx-RE for guile-devel@m.gmane.org; Tue, 29 Jan 2013 17:21:18 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0IAN-0006MH-1P for guile-devel@gnu.org; Tue, 29 Jan 2013 15:52:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0IAL-0005cM-Sk for guile-devel@gnu.org; Tue, 29 Jan 2013 15:52:26 -0500 Original-Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:26692) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0IAL-0005cA-MQ for guile-devel@gnu.org; Tue, 29 Jan 2013 15:52:25 -0500 X-IronPort-AV: E=Sophos;i="4.84,561,1355094000"; d="scan'208";a="418093" Original-Received: from reverse-83.fdn.fr (HELO pluto) ([80.67.176.83]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 29 Jan 2013 21:52:09 +0100 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 10 =?utf-8?Q?Pluvi=C3=B4se?= an 221 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <87mwvrkdr7.fsf@tines.lan> (Mark H. Weaver's message of "Tue, 29 Jan 2013 14:09:16 -0500") User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.134.164.104 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:15625 Archived-At: Mark H Weaver skribis: > I wrote: >> Having slept on this, I think I agree that 'open-input-file' should >> auto-consume BOMs. Good. > So what should (open-file FILENAME "r+") do? What about doing the same as for just =E2=80=9Cr=E2=80=9D? I can=E2=80=99t= think of any reasonable scenario where this could be a problem in practice. > Also, Unicode 6.2 section 2.6 table 2-4 says that BOMs are only allowed > for the encoding schemes UTF-8, UTF-16, and UTF-32. They are *not* > allowed for UTF-16BE, UTF-16LE, UTF-32BE, or UTF-32LE. What about this: in =E2=80=98open-file=E2=80=99, if %default-port-encoding = is one of the BE/LE variants, then skip the BOM logic; otherwise, check the presence of a BOM and consume it? Thanks for investigating! Ludo=E2=80=99.