[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SRFI-14 and locale settings
From: |
Neil Jerram |
Subject: |
Re: SRFI-14 and locale settings |
Date: |
Wed, 13 Sep 2006 19:07:23 +0100 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
address@hidden (Ludovic Courtès) writes:
> Hi,
>
> Neil Jerram <address@hidden> 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
- SRFI-14 and locale settings, Ludovic Courtès, 2006/09/03
- Re: SRFI-14 and locale settings, Neil Jerram, 2006/09/04
- Re: SRFI-14 and locale settings, Ludovic Courtès, 2006/09/04
- Re: SRFI-14 and locale settings, Kevin Ryde, 2006/09/04
- Re: SRFI-14 and locale settings, Ludovic Courtès, 2006/09/07
- Re: SRFI-14 and locale settings, Kevin Ryde, 2006/09/07
- Re: SRFI-14 and locale settings, Ludovic Courtès, 2006/09/12
- Re: SRFI-14 and locale settings, Neil Jerram, 2006/09/12
- Re: SRFI-14 and locale settings, Ludovic Courtès, 2006/09/13
- Re: SRFI-14 and locale settings,
Neil Jerram <=
- Re: SRFI-14 and locale settings, Ludovic Courtès, 2006/09/14
- Re: SRFI-14 and locale settings, Kevin Ryde, 2006/09/13
- Re: SRFI-14 and locale settings, Ludovic Courtès, 2006/09/14
- Re: SRFI-14 and locale settings, Kevin Ryde, 2006/09/14
- Re: SRFI-14 and locale settings, Neil Jerram, 2006/09/15
- Re: SRFI-14 and locale settings, Ludovic Courtès, 2006/09/16
- Re: SRFI-14 and locale settings, Kevin Ryde, 2006/09/18
- Re: SRFI-14 and locale settings, Ludovic Courtès, 2006/09/19
- Re: SRFI-14 and locale settings, Kevin Ryde, 2006/09/19
- Re: SRFI-14 and locale settings, Ludovic Courtès, 2006/09/20