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: [PATCH] Improve handling of Unicode byte-order marks (BOMs) Date: Fri, 05 Apr 2013 12:04:00 +0200 Message-ID: <87vc81z433.fsf@gnu.org> References: <87ip43zyf0.fsf@tines.lan> <87r4irq0zp.fsf@gnu.org> <874nfnza5g.fsf@tines.lan> <87a9pfml1n.fsf@gnu.org> <87zjxfxsl5.fsf@tines.lan> <8738v69g10.fsf@pobox.com> <87wqshv3gy.fsf@tines.lan> <1365147746.81118.YahooMailNeo@web120403.mail.ne1.yahoo.com> 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 1365278844 321 80.91.229.3 (6 Apr 2013 20:07:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Apr 2013 20:07:24 +0000 (UTC) Cc: Andy Wingo , Mark H Weaver , "guile-devel@gnu.org" To: Mike Gran Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Apr 06 22:07:20 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 1UOZK1-0001KY-UL for guile-devel@m.gmane.org; Sat, 06 Apr 2013 22:02:46 +0200 Original-Received: from localhost ([::1]:34187 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO3VI-00073j-6B for guile-devel@m.gmane.org; Fri, 05 Apr 2013 06:04:16 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO3VE-00073T-O3 for guile-devel@gnu.org; Fri, 05 Apr 2013 06:04:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UO3VD-0002ip-AR for guile-devel@gnu.org; Fri, 05 Apr 2013 06:04:12 -0400 Original-Received: from [2a01:e0b:1:123:ca0a:a9ff:fe03:271e] (port=39139 helo=xanadu.aquilenet.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO3VD-0002gM-3s for guile-devel@gnu.org; Fri, 05 Apr 2013 06:04:11 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 235D6CFB1; Fri, 5 Apr 2013 12:04:01 +0200 (CEST) Original-Received: from xanadu.aquilenet.fr ([127.0.0.1]) by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xLrdgTlPqh4A; Fri, 5 Apr 2013 12:04:01 +0200 (CEST) Original-Received: from pluto (unknown [193.50.110.199]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id CD4A1CF1A; Fri, 5 Apr 2013 12:04:00 +0200 (CEST) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 16 Germinal 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: <1365147746.81118.YahooMailNeo@web120403.mail.ne1.yahoo.com> (Mike Gran's message of "Fri, 5 Apr 2013 00:42:26 -0700 (PDT)") User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2a01:e0b:1:123:ca0a:a9ff:fe03:271e 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:16172 Archived-At: Mike Gran skribis: >>>> +=C2=A0 =C2=A0 =C2=A0 /* If the specified encoding is UTF-16 or UTF-3= 2, then make >>>> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 that more precise by deciding what endi= anness to use.=C2=A0 */ >>>> +=C2=A0 =C2=A0 =C2=A0 if (strcasecmp (pt->encoding, "UTF-16") =3D=3D = 0) >>>> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 precise_encoding =3D decide_utf16_encodi= ng (port, mode); >>>> +=C2=A0 =C2=A0 =C2=A0 else if (strcasecmp (pt->encoding, "UTF-32") = =3D=3D 0) >>>> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 precise_encoding =3D decide_utf32_encodi= ng (port, mode); >>>=20 >>> Ideally these comparisons would not be locale-dependent.=C2=A0 Dunno. >>=20 >> Yes, that would be preferable.=C2=A0 We talked about adding an >> 'ascii_strcasecmp' function.=C2=A0 What file do you think it should be >> defined in? > > It would be a trivial function to write, of course, but there is a > c-strcasecmp func in gnulib. Yes, better use that one. (Just add =E2=80=98c-strcase=E2=80=99 in m4/gnulib-cache.m4, run =E2=80=98g= nulib-tool --update=E2=80=99 with Gnulib v0.0-7865-ga828bb2, and git add the new files.) Ludo=E2=80=99.