From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Gran Newsgroups: gmane.lisp.guile.devel Subject: Re: fencepost error in encoding processing Date: Sun, 15 Nov 2009 00:48:57 -0800 (PST) Message-ID: <184417.3577.qm@web37907.mail.mud.yahoo.com> References: <30581C9F-01D3-4B5F-B413-EF46E1A3D365@raeburn.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1258274958 17229 80.91.229.12 (15 Nov 2009 08:49:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 15 Nov 2009 08:49:18 +0000 (UTC) To: Ken Raeburn , guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Nov 15 09:49:11 2009 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N9anD-0004aU-EY for guile-devel@m.gmane.org; Sun, 15 Nov 2009 09:49:07 +0100 Original-Received: from localhost ([127.0.0.1]:47123 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N9anC-0005xG-Pj for guile-devel@m.gmane.org; Sun, 15 Nov 2009 03:49:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N9an9-0005wF-P1 for guile-devel@gnu.org; Sun, 15 Nov 2009 03:49:03 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N9an5-0005uk-R8 for guile-devel@gnu.org; Sun, 15 Nov 2009 03:49:03 -0500 Original-Received: from [199.232.76.173] (port=44745 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N9an5-0005uh-Lh for guile-devel@gnu.org; Sun, 15 Nov 2009 03:48:59 -0500 Original-Received: from web37907.mail.mud.yahoo.com ([209.191.91.169]:27487) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1N9an4-0005z2-Eg for guile-devel@gnu.org; Sun, 15 Nov 2009 03:48:58 -0500 Original-Received: (qmail 4610 invoked by uid 60001); 15 Nov 2009 08:48:57 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1258274937; bh=gHNYH7NYi3xE5s7B3AQHluAsp8qSpreBOHWRHLw0m7A=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=yXFg5YLeFujpt00jrBV593XRzMKRCGLKkTyFJMjXqzASFmpf33lYY4ayeWkGGIx4+EzHPrHi1Jzl4h/3tPs6EQgewwQMk3V+Oa8SHq2rEGJSLWrWccHNhL5zzoJEtflhhVJd5ezkV1Z110nT286EQsD3sZOsqJvJxmh90PLXftg= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=VXjg+P1ssHW2ZwP08/OqSpAxEcR3KrD2QOSWxWnPF4O1ZuXHoo5Foa/VDLCdUbO8snHkJj4VMv1iy6CiToiP7NsT+w8OEgFvMPs2qmFz+Z5CsT8Av71MKqL4rzS2aCjhYUOpuNZDA3WKJq6mcukAOvS8LteUgQ3FkQvNWmxMYV4=; X-YMail-OSG: 5rpvaJUVM1mp1nFQw1RNhsBHQJMIX.PqTr35hcLulRb7jk.xRlaLLpZtUvAdzygZHY48vxlaPowu98rvWKvwKQpwQvsGMNO9CteKHx9DESABz1uyF9qP0_Rbgrs_LAyFhZ8eovTaTsBYS9uVAqS0KnAX4vbt6.AVjknf5JCUIO8DlLgx2Iour6Mw1t8_ERaHVNTYzD43BJOg.NbFanlmvAniGjy3d6Rd40F1e0YyB7B7w8AjKYaUXdYo_I2RGv_pzMEOkznNlSa7jj3ARLERpQ7yrrZgTBUjddF56nKfpYnpQoWdu1LoNyysUuaNIyTjHyNXnirRt0DenVbxSkSN.Citx7uG4SwgqRCN4vuw9ZzEm8S091pZKQIBbrI.mNCahVm.mQQHGkG4McLdVCqoy4Q4fF5QY6vao657uE83eHZ_pKeL2BFNgQ0ts07nYEobT27VG1.bsxe8FrFdg7weRYI1BSibdaORMIrzTzhSqKc17Q5jYeVHe0dQ Original-Received: from [71.130.216.164] by web37907.mail.mud.yahoo.com via HTTP; Sun, 15 Nov 2009 00:48:57 PST X-Mailer: YahooMailRC/211.6 YahooMailWebService/0.7.361.4 In-Reply-To: <30581C9F-01D3-4B5F-B413-EF46E1A3D365@raeburn.org> X-detected-operating-system: by monty-python.gnu.org: FreeBSD 6.x (1) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:9670 Archived-At: > From: Ken Raeburn raeburn@raeburn.org=0A=0A> iconv_t=0A> iconv_open (cons= t char *tocode, const char *fromcode)=0A> {=0A> =A0 /* Normalize the name.= =A0 We remove all characters beside alpha-numeric,=0A> =A0 =A0 '_', '-', '/= ', '.', and ':'.=A0 */=0A> =A0 ...=0A> =0A> If there's reason to believe th= at all these characters might show up in valid =0A> encoding names, we migh= t want to borrow that list for scm_i_scan_for_encoding =0A> too.=A0 In fact= , since we don't control the iconv implementation, we should =0A> probably = be *at least* as lenient as glibc in accepting random characters.=0A=0AYou'= re probably right.=A0 A rather complete set of aliases for encoding names= =0Acan be found=A0by exploring=A0ICU's database of aliases at=0Ahttp://demo= .icu-project.org/icu-bin/convexp=A0=0A=0AAmong those aliases, there are exa= mples of the punctuation in the=0Aiconv_open code snippet above (underscore= , hyphen,=A0forward slash, period, and colon)=0Aas well as three others: eq= uals sign, plus sign, and comma.=A0 The specification=0Aon iconv_open doesn= 't place any limits on the characters allowed as input to=0Aiconv_open; how= ever, these eight symbols above should cover any case we're likely=0Ato see= .=0A=0A> =0A> Okay to check in?=0A=0AFWIW, it looks right to me.=0A=0A-Mike= Gran=0A