[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SRFI-14 and locale settings
From: |
Kevin Ryde |
Subject: |
Re: SRFI-14 and locale settings |
Date: |
Tue, 19 Sep 2006 09:48:00 +1000 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
address@hidden (Ludovic Courtès) writes:
>
> (in particular, `ispunct ()' does not match `char-set:punctuation').
Oh, it's a bit bigger.
> but `punctuation', for instance, is a superset of what
> SRFI-14 expects while `symbol' is (correspondingly) a subset of what it
> should be,
Does the srfi specified relation to graphic still hold? Ie.
graphic = letter + digit + punctuation + symbol
> -#define SCM_CHARSET_SET(cs, idx) \
> - (((long *) SCM_SMOB_DATA (cs))[(idx) / SCM_BITS_PER_LONG] |= \
> +#define SCM_CHARSET_SET(cs, idx) \
> + (((long *) SCM_SMOB_DATA (cs))[(idx) / SCM_BITS_PER_LONG] |= \
> (1L << ((idx) % SCM_BITS_PER_LONG)))
Is that a change?
> + if (pred (c)) \
> + SCM_CHARSET_SET ((cset), (c)); \
> + else \
> + SCM_CHARSET_UNSET ((cset), (c)); \
It may be possible to do a "set to a value" rather than separate
set/unset macros.
> -(use-modules (srfi srfi-14))
> +(use-modules (srfi srfi-14)
> + (srfi srfi-1) ;; `every'
> + (test-suite lib))
A "define-module" there can prevent srfi-1 leaking out to subsequent
tests.
> +(define (find-latin1-locale)
> + ;; Try to find and install an ISO-8859-1 locale. Return `#f' on failure.
> + (if (defined? 'setlocale)
> + (let loop ((locales (map (lambda (lang)
> + (string-append lang ".iso88591"))
> + '("de_DE" "en_GB" "en_US" "es_ES"
> + "fr_FR" "it_IT"))))
The posix "locale -a" program can print all available locales, if you
wanted to ask nl_langinfo(CODESET) or "locale -k charmap" what the
charset is for each of them, or just try the undotted ones with
8859-1, or whatever.
- Re: SRFI-14 and locale settings, (continued)
- 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, 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/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 <=
- 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
- Re: SRFI-14 and locale settings, Neil Jerram, 2006/09/22
- Re: SRFI-14 and locale settings, Ludovic Courtès, 2006/09/25
- Re: SRFI-14 and locale settings, Ludovic Courtès, 2006/09/15