From: Neil Jerram <neil@ossau.uklinux.net>
Subject: Re: SRFI-14 and locale settings
Date: Wed, 13 Sep 2006 19:07:23 +0100 [thread overview]
Message-ID: <87y7snwsh0.fsf@ossau.uklinux.net> (raw)
In-Reply-To: <87lkooqie6.fsf@laas.fr> ( Ludovic Courtès's message of "Wed, 13 Sep 2006 10:29:21 +0200")
ludovic.courtes@laas.fr (Ludovic Courtès) writes:
> Hi,
>
> Neil Jerram <neil@ossau.uklinux.net> writes:
>
>> Yes. So it seems to me, therefore, that we should not be using
>> isalpha() etc. to construct char-set:letter, but should instead hard
>> code it as the intersection of (char-set:letter as specified by SRFI
>> 14) with (the set of characters that Guile can represent).
>
> In practice, I can think of two ways to determine the set of _letters_
> available in the current encoding (which is what `char-set:letter'
> expects).
>
> 1. Since SRFI-14 lists all the characters that have to be added to the
> ASCII `char-set:letter' to get the Latin-1 `char-set:letter', we
> could somehow hard-code them. But this is ugly.
I don't see why you think it's ugly. If it's the right solution, it's
the right solution.
> 2. Or, we can use a predicate that uses the `is' functions which we
> expect to be language-independent (i.e., those functions that only
> depend on the locale's charset), such as:
>
> (!isblank (c)) && (!ispunct (c)) && (!isdigit (c)) && (!iscntrl (c))
Now this is ugly, IMO!
> This is certainly not perfect, but it should work for Latin-1, and
> hopefully for other 8-bit charsets as well.
>
> As Kevin mentioned earlier, all the char sets could be re-computed in
> `scm_setlocale ()'.
This sounds even trickier, and wrong, given that the intention of SRFI
14 is for char-set:letter to be locale-independent.
Regards,
Neil
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
next prev parent reply other threads:[~2006-09-13 18:07 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-03 16:48 SRFI-14 and locale settings Ludovic Courtès
2006-09-04 6:41 ` Neil Jerram
2006-09-04 9:08 ` Ludovic Courtès
2006-09-04 23:42 ` Kevin Ryde
2006-09-07 7:21 ` Ludovic Courtès
2006-09-07 23:22 ` Kevin Ryde
2006-09-12 9:28 ` Ludovic Courtès
2006-09-12 18:17 ` Neil Jerram
2006-09-13 8:29 ` Ludovic Courtès
2006-09-13 18:07 ` Neil Jerram [this message]
2006-09-14 15:58 ` Ludovic Courtès
2006-09-14 0:07 ` Kevin Ryde
2006-09-14 13:22 ` Ludovic Courtès
2006-09-15 0:53 ` Kevin Ryde
2006-09-15 9:28 ` Neil Jerram
2006-09-16 13:46 ` Ludovic Courtès
2006-09-18 23:48 ` Kevin Ryde
2006-09-19 12:28 ` Ludovic Courtès
2006-09-19 22:42 ` Kevin Ryde
2006-09-20 13:21 ` Ludovic Courtès
2006-09-22 20:02 ` Neil Jerram
2006-09-25 8:27 ` Ludovic Courtès
2006-09-15 12:03 ` 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=87y7snwsh0.fsf@ossau.uklinux.net \
--to=neil@ossau.uklinux.net \
/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).