diff options
author | Michael Gran <spk121@yahoo.com> | 2009-08-28 23:47:42 -0700 |
---|---|---|
committer | Michael Gran <spk121@yahoo.com> | 2009-08-29 00:01:06 -0700 |
commit | 24d23822ee9d6a515aed8baaeff9d363fd7ec813 (patch) | |
tree | cfdcae66a6e223a15dcafedc25d551d2ffd8e7b0 /libguile/srfi-14.c | |
parent | 526ee76ac36921570708a746e73bba1cd7da2f62 (diff) | |
download | guile-24d23822ee9d6a515aed8baaeff9d363fd7ec813.tar.gz |
Surrogate characters shouldn't be in charsets
* libguile/srfi-14.c (charsets_complement): use surrogate #defines instead
of hardcoded numbers
* libguile/srfi-14.i.c (cs_full_ranges): remove surrogates from full
charset
* libguile/unidata_to_charset.pl (full): test for surrogates
Diffstat (limited to 'libguile/srfi-14.c')
-rw-r--r-- | libguile/srfi-14.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libguile/srfi-14.c b/libguile/srfi-14.c index 7ab65ac97..50229ef0f 100644 --- a/libguile/srfi-14.c +++ b/libguile/srfi-14.c @@ -29,6 +29,7 @@ #include "libguile.h" #include "libguile/srfi-14.h" #include "libguile/strings.h" +#include "libguile/chars.h" /* Include the pre-computed standard charset data. */ #include "libguile/srfi-14.i.c" @@ -386,8 +387,8 @@ charsets_complement (scm_t_char_set *p, scm_t_char_set *q) p->ranges = scm_gc_malloc (sizeof (scm_t_char_range) * 2, "character-set"); p->ranges[0].lo = 0; - p->ranges[0].hi = 0xd7ff; - p->ranges[1].lo = 0xe000; + p->ranges[0].hi = SCM_CODEPOINT_SURROGATE_START - 1; + p->ranges[1].lo = SCM_CODEPOINT_SURROGATE_END + 1; p->ranges[1].hi = SCM_CODEPOINT_MAX; return; } |