From: Mike Gran <spk121@yahoo.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guile-devel@gnu.org
Subject: Re: make check fails if no en_US.iso88591 locale
Date: Thu, 10 Sep 2009 05:44:56 -0700 [thread overview]
Message-ID: <1252586696.24639.116.camel@localhost.localdomain> (raw)
In-Reply-To: <87r5uf8574.fsf@gnu.org>
On Thu, 2009-09-10 at 12:27 +0200, Ludovic Courtès wrote:
> Hello!
>
> I built today’s ‘master’ on a ppc64 box and there are many
> regexp-related errors and a surprisingly high number of unresolved
> regexp-related tests:
>
> http://autobuild.josefsson.org/guile/log-200909100539539848000.txt
>
> This machine only has the following locales:
>
> C
> en_US.utf8
> POSIX
>
I'm not surprised to see the unresolved, since I'd wrapped a lot of
those tests to throw unresolved if a Latin-1 locale wasn't found. The
errors are a surprise: they indicate that my strategy for wrapping in a
Latin-1 locale isn't correct.
The reason for declaring a Latin-1 locale was to allow
scm_to/from_locale_string to convert a scheme string with values from 0
to 255 to an 8-bit binary C string. The regexp.test runs on arbitrary
binary data which wasn't a problem in guile-1.8 since
scm_to/from_locale_string did no real locale conversion.
I could fix the test by testing only characters 0 to 127 in a C locale
if a Latin-1 locale can't be found. I can also fix the test by using
the 'setbinary' function to force the encodings on stdin and stdout to a
default value that will pass through binary data, instead of calling
'setlocale'. The procedure 'setbinary' was always a hack, and I kind of
want to get rid of it, but, this is why it was created.
I looked in the POSIX spec on Regex for specific advice using 128-255 in
regex in the C locale. I didn't see anything offhand. The spec does
spend a lot of time talking about the interaction between the locale and
regular expressions. I get the impression from the spec that using
regex on 128-255 in the C locale is an unexpected use of regular
expressions.
Thanks,
Mike
next prev parent reply other threads:[~2009-09-10 12:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-09 0:45 make check fails if no en_US.iso88591 locale Neil Jerram
2009-09-09 1:28 ` Mike Gran
2009-09-09 21:53 ` Neil Jerram
2009-09-10 2:36 ` Mike Gran
2009-09-10 10:27 ` Ludovic Courtès
2009-09-10 12:44 ` Mike Gran [this message]
2009-09-10 15:33 ` Ludovic Courtès
2009-09-11 4:28 ` Mike Gran
2009-09-10 19:34 ` Neil Jerram
2009-09-10 21:17 ` Mike Gran
2009-09-09 8:08 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1252586696.24639.116.camel@localhost.localdomain \
--to=spk121@yahoo.com \
--cc=guile-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).