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: make check fails if no en_US.iso88591 locale Date: Tue, 8 Sep 2009 18:28:52 -0700 (PDT) Message-ID: <322965.9784.qm@web37906.mail.mud.yahoo.com> References: <87pra1djys.fsf@arudy.ossau.uklinux.net> 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 1252459754 23253 80.91.229.12 (9 Sep 2009 01:29:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Sep 2009 01:29:14 +0000 (UTC) To: Neil Jerram , Guile Development Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Sep 09 03:29:07 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 1MlBze-00060O-Do for guile-devel@m.gmane.org; Wed, 09 Sep 2009 03:29:06 +0200 Original-Received: from localhost ([127.0.0.1]:57831 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlBzc-0004ZE-To for guile-devel@m.gmane.org; Tue, 08 Sep 2009 21:29:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlBzV-0004Wc-DP for guile-devel@gnu.org; Tue, 08 Sep 2009 21:28:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlBzR-0004Tv-RJ for guile-devel@gnu.org; Tue, 08 Sep 2009 21:28:57 -0400 Original-Received: from [199.232.76.173] (port=36055 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlBzR-0004Tp-MH for guile-devel@gnu.org; Tue, 08 Sep 2009 21:28:53 -0400 Original-Received: from web37906.mail.mud.yahoo.com ([209.191.91.168]:36731) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MlBzR-0002MD-AZ for guile-devel@gnu.org; Tue, 08 Sep 2009 21:28:53 -0400 Original-Received: (qmail 10812 invoked by uid 60001); 9 Sep 2009 01:28:52 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1252459732; bh=C3mLeCdSBsmzF9BhxOqQS8EnlkTyXlhdkwB8ZqP+4sU=; 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=3kw2wmEnaozqDRqhCJcL+/rv+iPp/lwFkMxGLAEm59xLghQ/rh4LP4VZyjPgns9Hrwd+I31l3Zb8w9EUomTxEqIXsMzPe4KCzVKViOyF6uEKfApr3RS8hRJ0jaRtqgOKZUx1MLO5I/rTJ0s5fHhXkDkWP3HZYIKn/KbUuCEJZp8= 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=VSWmYv9r2sg8Ouu3eobEQbkunuVvpo+Lee4q7ndGLLVOsnunAT7v9qmrTPgSuMwbt3NLnuNOqnuCe9GBpmEOfABx5YOyNAqIXEjV0b+5lCUJmJvkZIKLfHjp5ti89DfW3rdWMrQ99j5R5MaRJYl2qEVVU+0dk0mOexG6aBvsYLc=; X-YMail-OSG: wIZmNaEVM1nIPu4Z0Dr9W7PYvKddqAskrxLhiREmhlhLXMNRP2vDtW1DNDKiPQBSblSSvEghlqhgqjABtbpJbfW7Cj3Frwqf6KhUwBuPLfPTCNI0JtaVPsj3nvtk2UoBp.a7FP7N20mday_ATuLvT_odPKWUL0vqjc.kVSUQ4PqlsES0w5YXlijkv0uPx6._ERBTdIvhY8A_IeRXZSgVckW7rMmnW3lRJivE6SaCshTVbzzkgWijWyO3LFMDB4srNSIt8QXYGxUBkdTG6tHjRwz2B__BvNxBSoL8wRY63FAtVq_lB3xhCPJhVLbnxQArvke28LyyN6uny9WpRCHyls9VJJ0E1QnTu4dHTXEV8kHCSToD.rrqjg-- Original-Received: from [207.8.91.2] by web37906.mail.mud.yahoo.com via HTTP; Tue, 08 Sep 2009 18:28:52 PDT X-Mailer: YahooMailRC/1358.27 YahooMailWebService/0.7.338.2 In-Reply-To: <87pra1djys.fsf@arudy.ossau.uklinux.net> 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:9284 Archived-At: > From: Neil Jerram =0A> =0A> make check fails for = me in regexp.test:=0A> =0A> =A0 ...=0A> =A0 Running regexp.test=0A> =A0 gui= le: uncaught throw to unresolved: ()=0A> =0A> because I don't have an en_US= .iso88591 locale installed, and so=0A> =0A> =A0 (with-locale "en_US.iso8859= 1" ...)=0A> =0A> throws an 'unresolved exception.=0A> =0A=0AMy bad.=A0 Actu= ally, I should have enclosed the 'with-locale' in the=0Acontext of a 'pass-= if', which would have caught the exception.=0A=0A> I can allow make check t= o complete by changing that line to=0A> =0A> =A0 (false-if-exception (with-= locale "en_US.iso88591"=0A> =0A> but I doubt that's the best fix.=A0 Is the= "en_US.iso88591" locale=0A> actually important for the enclosed tests?=0A= =0AIt is important.=A0 This is one of the problems with the whole Unicode= =0Aeffort.=A0=A0There is no Unicode-capable regex library.=A0 The regexp.te= st=0Atries matching all bytes from 0 to 255, and it uses scm_to_locale_stri= ng=0Ato prep the string for dispatch to the libc regex calls and=0Ascm_from= _locale_string to send them back.=A0 =0A=0AIf the current locale is C or AS= CII, bytes above 127 will cause errors.=0AIf the current locale is UTF-8, b= ytes above 127 will be converted into=0Amultibyte sequences that won't be m= atched by the regular expression=0Abeing tested.=A0 To pass the test in reg= exp.test, we need to use the =0Aencoding that matches all of the codepoints= 0 to 255 to single byte=0Acharacters, which is ISO-8859-1.=0A=0ASo until a= better=A0regex comes along, wrapping regex in an=0A8-bit-clean-friendly lo= cale like Latin-1 is necessary to avoid encoding=0Aerrors when encoding arb= itrary 8-bit data like the test does.=0A=0AThe reason why this problem is c= ropping up now and didn't occur before=0Ais because the old scm_to_locale_s= tring was just a stub that passed=0A8-bit data through unmodified.=0A=0AThi= s regex library actually can be used with arbitrary Unicode data=0Abut it t= akes extra care.=A0 UTF-8 can be used as the locale, and, then=0Aregular ex= pression must be written keeping in mind that each non-ASCII=0Acharacter is= really a multibyte string.=0A=0A> =0A> Thanks,=0A> =A0 =A0 =A0 =A0 Neil=0A= =0AThanks,=0A=0AMike