guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, string_abstraction2, updated. release_


From: Michael Gran
Subject: [Guile-commits] GNU Guile branch, string_abstraction2, updated. release_1-9-1-74-gc2352f7
Date: Sun, 26 Jul 2009 19:48:59 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=c2352f773a02deb840351db2a66ec66240f53575

The branch, string_abstraction2 has been updated
       via  c2352f773a02deb840351db2a66ec66240f53575 (commit)
       via  1568eadfba803ed21333705b8b7b1737dabde78e (commit)
       via  3b0b6bc1dd2eb24405ad8e75889df0874f879892 (commit)
       via  10331eac7e3c7b802718af515d17e50dca525b3f (commit)
       via  ec99fe8ecb412e49e8e981246eb62ca46b32754b (commit)
       via  5bd047cefa9ffcf17751dbeda1fa56ae56f45199 (commit)
       via  b67cb2864e0de124bd7c4f9b0fda442329e09f3f (commit)
       via  e1203ea00f033954e385a0f2f6aa8b886778dab1 (commit)
       via  a823e7272e7e2800491704a342c6853bc5d95d4e (commit)
       via  07f99e1c6a74017f41bdc1355cf8645392f433c6 (commit)
       via  99c7d3caf622b8ed355562359b445396dee1532c (commit)
       via  9e1a18db9fd34a6156007c7db563f46095989b62 (commit)
       via  ba4c43dc3b6c4bb3b65883283e00228df6029371 (commit)
       via  19fef497f09c7ddd9e91e3da2e86bcdfb7f303d0 (commit)
       via  ef283979cf2fe9aca3854da0aae2cf7db4d86418 (commit)
       via  ad47e35939ef86a031af68d5875de4180f2517cb (commit)
       via  cec1d4e33f1485985df9877330729c964f38cc2f (commit)
       via  d10c572e38a888e4f999c7f3229781e53b9a74ec (commit)
       via  44362a1086b778efb47b7c64a8ed38db5f82d0ae (commit)
      from  dfbffd238773eb397402dac8033d34b55407e579 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c2352f773a02deb840351db2a66ec66240f53575
Author: Michael Gran <address@hidden>
Date:   Sun Jul 26 12:47:26 2009 -0700

    Use pregenerated standard srfi-14 charsets
    
    Creating full Unicode srfi-14 charsets on startup takes a
    significant amount of time.  To fix this, pre-generated srfi-14
    charsets are used.  A perl script was used to create C code from
    the UnicodeData.txt file that the Unicode Consortium supplies.
    
    
            * libguile/srfi-14.h: remove declarations for
            scm_srfi_14_compute_char_sets and scm_populate_standard_char_sets
    
            * libguile/srfi-14.c: (scm_populate_standard_char_sets): removed
            (scm_srfi_14_compute_char_sets): removed
            (define_charset): Take C charset struct.
    
            * libguile/srfi-14.i.c: New file
    
            * libguile/unidata_to_charset.pl: New script
    
            * libguile/Makefile.am: Add unidata_to_charset.pl and srfi-14.i.c

commit 1568eadfba803ed21333705b8b7b1737dabde78e
Merge: dfbffd238773eb397402dac8033d34b55407e579 
3b0b6bc1dd2eb24405ad8e75889df0874f879892
Author: Michael Gran <address@hidden>
Date:   Tue Jul 21 21:02:39 2009 -0700

    Merge branch 'master' into string_abstraction2

-----------------------------------------------------------------------

Summary of changes:
 GUILE-VERSION                                 |    2 +-
 NEWS                                          |   89 +-
 lib/Makefile.am                               |    2 +-
 libguile/Makefile.am                          |    4 +-
 libguile/gen-scmconfig.c                      |   15 -
 libguile/instructions.c                       |   17 +-
 libguile/instructions.h                       |    1 -
 libguile/objcodes.c                           |   34 +-
 libguile/objcodes.h                           |    4 +-
 libguile/srfi-14.c                            |  163 +-
 libguile/srfi-14.h                            |    2 -
 libguile/srfi-14.i.c                          | 3655 +++++++++++++++++++++++++
 libguile/unidata_to_charset.pl                |  395 +++
 libguile/vm-i-scheme.c                        |   30 +-
 libguile/vm.c                                 |   34 +-
 m4/gnulib-cache.m4                            |    3 +-
 module/language/assembly/compile-bytecode.scm |    3 +
 module/system/base/compile.scm                |   27 +-
 module/system/base/syntax.scm                 |   27 +-
 module/system/repl/common.scm                 |   27 +-
 module/system/repl/describe.scm               |   27 +-
 module/system/vm/instruction.scm              |   27 +-
 module/system/vm/objcode.scm                  |   27 +-
 module/system/vm/profile.scm                  |   27 +-
 module/system/vm/program.scm                  |   21 +-
 module/system/vm/trace.scm                    |   27 +-
 test-suite/tests/asm-to-bytecode.test         |   41 +-
 testsuite/run-vm-tests.scm                    |    7 +-
 28 files changed, 4397 insertions(+), 341 deletions(-)
 create mode 100644 libguile/srfi-14.i.c
 create mode 100755 libguile/unidata_to_charset.pl

diff --git a/GUILE-VERSION b/GUILE-VERSION
index c23f8f6..fa96ed9 100644
--- a/GUILE-VERSION
+++ b/GUILE-VERSION
@@ -2,7 +2,7 @@
 
 GUILE_MAJOR_VERSION=1
 GUILE_MINOR_VERSION=9
-GUILE_MICRO_VERSION=0
+GUILE_MICRO_VERSION=1
 
 GUILE_EFFECTIVE_VERSION=${GUILE_MAJOR_VERSION}.${GUILE_MINOR_VERSION}
 GUILE_VERSION=${GUILE_EFFECTIVE_VERSION}.${GUILE_MICRO_VERSION}
diff --git a/NEWS b/NEWS
index 36d36cb..445bb1c 100644
--- a/NEWS
+++ b/NEWS
@@ -5,7 +5,78 @@ See the end for copying conditions.
 Please send Guile bug reports to address@hidden
 
 
-Changes in 1.9.0 (changes since the 1.8.x series):
+(During the 1.9 series, we will keep an incremental NEWS for the latest
+prerelease, and a full NEWS corresponding to 1.8 -> 2.0.)
+
+Changes in 1.9.1 (since the 1.9.0 prerelease):
+
+** `scm_set_port_seek' and `scm_set_port_truncate' use the `scm_t_off' type
+
+Previously they would use the `off_t' type, which is fragile since its
+definition depends on the application's value for `_FILE_OFFSET_BITS'.
+
+** Automatically compiled files will be placed in ~/.cache, not 
~/.guile-ccache.
+
+Actually, they will be placed in $XDG_CACHE_HOME/guile/ccache/1.9,
+defaulting to XDG_CACHE_HOME=~/.cache. Users may remove their
+~/.guile-ccache directories.
+
+** New language: Brainfuck.
+
+Brainfuck is a toy language that closely models Turing machines. Guile's
+brainfuck compiler is meant to be an example of implementing other
+languages. See the manual for details, or
+http://en.wikipedia.org/wiki/Brainfuck for more information about the
+Brainfuck language itself.
+
+** A number of Scheme files were corrected to be LGPLv3+.
+
+Some Scheme files imported for the compiler were erroneously labeled as
+being LGPLv2+ or GPLv2+. This oversight has been fixed.
+
+** Bytevectors may now be accessed with a C-friendly API.
+
+New functions: `scm_is_bytevector ()', `scm_c_bytevector_length ()',
+`scm_c_bytevector_length ()', and `scm_c_bytevector_set_x ()'. See the
+manual for details.
+
+** Bytevectors are now accessible using the generalized-vector API.
+
+As a side effect, this change allows compilation of literal bytevectors
+(`#vu8(...)').
+
+** Meta-commands to the REPL work better with strange languages.
+
+Specifically, meta-commands that take expressions as arguments will use
+the current language's reader to read those expressions, which may span
+multiple lines, with readline integration if the user has that enabled.
+
+** The object code file format has changed.
+
+The objcode loader will complain about a "bad header cookie" if it
+happens to find an old file. The workaround for that is currently to
+find all stale .go files and remove them. This is likely to affect users
+who have checked out Guile's git repository, not those that build from
+tarballs.
+
+** Vector access has been sped up considerably.
+
+Guile's virtual machine now has vector and bytevector operations. Using
+Guile to process large amounts of data is now easier. This is because
+`vector-ref' and `vector-set!' now have fast opcodes. In addition, there
+are opcodes for `ref' and `set' operations on bytevectors for everything
+from 8-bit integers to 64-bit floating-point values.
+
+In the next release, we hope to extend this speedup to other kinds of
+uniform vectors.
+
+** The `long_long' C type, deprecated in 1.8, has been removed.
+
+** And of course, the usual collection of bugfixes.
+
+Interested users should see the ChangeLog for more information.
+
+Changes in 1.9.x (since the 1.8.x series):
 
 * New modules (see the manual for details)
 
@@ -66,9 +137,9 @@ modification times; if the .scm or .go files are moved after
 installation, care should be taken to preserve their original
 timestamps.
 
-Autocompiled files will be stored in the user's ~/.guile-ccache
-directory, which will be created if needed. This is analogous to
-ccache's behavior for C files.
+Autocompiled files will be stored in the $XDG_CACHE_HOME/guile/ccache
+directory, where $XDG_CACHE_HOME defaults to ~/.cache. This directory
+will be created if needed.
 
 To inhibit autocompilation, set the GUILE_AUTO_COMPILE environment
 variable to 0, or pass --no-autocompile on the Guile command line.
@@ -123,6 +194,14 @@ ECMAScript. The goal is to support all of version 3.1 of 
the standard,
 but not all of the libraries are there yet. This support is not yet
 documented; ask on the mailing list if you are interested.
 
+** New language: Brainfuck
+
+Brainfuck is a toy language that closely models Turing machines. Guile's
+brainfuck compiler is meant to be an example of implementing other
+languages. See the manual for details, or
+http://en.wikipedia.org/wiki/Brainfuck for more information about the
+Brainfuck language itself.
+
 ** Defmacros may now have docstrings.
 
 Indeed, any macro may have a docstring. `object-documentation' from
@@ -516,6 +595,8 @@ This procedure corresponds to Scheme's 
`module-public-interface'.
 Previously they would use the `off_t' type, which is fragile since its
 definition depends on the application's value for `_FILE_OFFSET_BITS'.
 
+** The `long_long' C type, deprecated in 1.8, has been removed
+
 * Changes to the distribution
 
 ** Guile's license is now LGPLv3+
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 197320e..424e590 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -9,7 +9,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib 
--m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl 
--libtool --macro-prefix=gl --no-vc-files alloca-opt autobuild byteswap 
canonicalize-lgpl count-one-bits environ extensions flock fpieee full-read 
full-write havelib iconv_open-utf lib-symbol-visibility libunistring putenv 
stdlib strcase strftime striconveh string vsnprintf
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib 
--m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl 
--libtool --macro-prefix=gl --no-vc-files alloca-opt autobuild byteswap 
canonicalize-lgpl count-one-bits environ extensions flock fpieee full-read 
full-write havelib iconv_open-utf lib-symbol-visibility libunistring putenv 
stdlib strcase strftime striconveh string verify vsnprintf
 
 AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects
 
diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index f5b0978..57f173e 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -211,7 +211,7 @@ install-exec-hook:
 noinst_HEADERS = convert.i.c                                   \
                  conv-integer.i.c conv-uinteger.i.c            \
                  eval.i.c ieee-754.h                           \
-                 srfi-4.i.c                                    \
+                 srfi-4.i.c srfi-14.i.c                                \
                  quicksort.i.c                                  \
                  win32-uname.h win32-dirent.h win32-socket.h   \
                 private-gc.h private-options.h
@@ -264,7 +264,7 @@ EXTRA_DIST = ChangeLog-scm ChangeLog-threads                
\
     cpp_errno.c cpp_err_symbols.in cpp_err_symbols.c                   \
     cpp_sig_symbols.c cpp_sig_symbols.in cpp_cnvt.awk                  \
     c-tokenize.lex version.h.in                                                
\
-    scmconfig.h.top libgettext.h
+    scmconfig.h.top libgettext.h unidata_to_charset.pl
 #    $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) \
 #    guile-procedures.txt guile.texi
 
diff --git a/libguile/gen-scmconfig.c b/libguile/gen-scmconfig.c
index 98fcc88..d569638 100644
--- a/libguile/gen-scmconfig.c
+++ b/libguile/gen-scmconfig.c
@@ -279,21 +279,6 @@ main (int argc, char *argv[])
   pf ("#define SCM_SIZEOF_LONG_LONG %d\n", SIZEOF_LONG_LONG);
   pf ("#define SCM_SIZEOF_UNSIGNED_LONG_LONG %d\n", SIZEOF_UNSIGNED_LONG_LONG);
 
-  pf("\n");
-  pf("/* handling for the deprecated long_long and ulong_long types */\n");  
-  pf("/* If anything suitable is available, it'll be defined here.  */\n");  
-  pf("#if (SCM_ENABLE_DEPRECATED == 1)\n");
-  if (SIZEOF_LONG_LONG != 0)
-    pf ("typedef long long long_long;\n");
-  else if (SIZEOF___INT64 != 0)
-    pf ("typedef __int64 long_long;\n");
-  
-  if (SIZEOF_UNSIGNED_LONG_LONG != 0)
-    pf ("typedef unsigned long long ulong_long;\n");
-  else if (SIZEOF_UNSIGNED___INT64 != 0)
-    pf ("typedef unsigned __int64 ulong_long;\n");
-  pf("#endif /* SCM_ENABLE_DEPRECATED == 1 */\n");
-
   pf ("\n");
   pf ("/* These are always defined. */\n");
   pf ("typedef %s scm_t_int8;\n", SCM_I_GSC_T_INT8);
diff --git a/libguile/instructions.c b/libguile/instructions.c
index 8e6d169..04180e5 100644
--- a/libguile/instructions.c
+++ b/libguile/instructions.c
@@ -53,7 +53,7 @@ fetch_instruction_table ()
 
   if (SCM_UNLIKELY (!table))
     {
-      size_t bytes = scm_op_last * sizeof(struct scm_instruction);
+      size_t bytes = SCM_VM_NUM_INSTRUCTIONS * sizeof(struct scm_instruction);
       int i;
       table = malloc (bytes);
       memset (table, 0, bytes);
@@ -63,11 +63,12 @@ fetch_instruction_table ()
 #include <libguile/vm-i-scheme.i>
 #include <libguile/vm-i-loader.i>
 #undef VM_INSTRUCTION_TO_TABLE
-      for (i = 0; i < scm_op_last; i++)
+      for (i = 0; i < SCM_VM_NUM_INSTRUCTIONS; i++)
         {
           table[i].opcode = i;
           if (table[i].name)
-            table[i].symname = scm_from_locale_symbol (table[i].name);
+            table[i].symname =
+              scm_permanent_object (scm_from_locale_symbol (table[i].name));
           else
             table[i].symname = SCM_BOOL_F;
         }
@@ -85,12 +86,12 @@ scm_lookup_instruction_by_name (SCM name)
   if (SCM_UNLIKELY (SCM_FALSEP (instructions_by_name)))
     { 
       int i;
-      instructions_by_name = scm_make_hash_table (SCM_I_MAKINUM (scm_op_last));
-      for (i = 0; i < scm_op_last; i++)
+      instructions_by_name = scm_permanent_object
+        (scm_make_hash_table (SCM_I_MAKINUM (SCM_VM_NUM_INSTRUCTIONS)));
+      for (i = 0; i < SCM_VM_NUM_INSTRUCTIONS; i++)
         if (scm_is_true (table[i].symname))
           scm_hashq_set_x (instructions_by_name, table[i].symname,
                            SCM_I_MAKINUM (i));
-      instructions_by_name = scm_permanent_object (instructions_by_name);
     }
   
   op = scm_hashq_ref (instructions_by_name, name, SCM_UNDEFINED);
@@ -111,7 +112,7 @@ SCM_DEFINE (scm_instruction_list, "instruction-list", 0, 0, 
0,
   SCM list = SCM_EOL;
   int i;
   struct scm_instruction *ip = fetch_instruction_table ();
-  for (i = 0; i < scm_op_last; i++)
+  for (i = 0; i < SCM_VM_NUM_INSTRUCTIONS; i++)
     if (ip[i].name)
       list = scm_cons (ip[i].symname, list);
   return scm_reverse_x (list, SCM_EOL);
@@ -182,7 +183,7 @@ SCM_DEFINE (scm_opcode_to_instruction, 
"opcode->instruction", 1, 0, 0,
   SCM_MAKE_VALIDATE (1, op, I_INUMP);
   opcode = SCM_I_INUM (op);
 
-  if (opcode < scm_op_last)
+  if (opcode >= 0 && opcode < SCM_VM_NUM_INSTRUCTIONS)
     ret = fetch_instruction_table ()[opcode].symname;
 
   if (scm_is_false (ret))
diff --git a/libguile/instructions.h b/libguile/instructions.h
index d081b3e..a226322 100644
--- a/libguile/instructions.h
+++ b/libguile/instructions.h
@@ -31,7 +31,6 @@ enum scm_opcode {
 #include <libguile/vm-i-scheme.i>
 #include <libguile/vm-i-loader.i>
 #undef VM_INSTRUCTION_TO_OPCODE
-  scm_op_last = SCM_VM_NUM_INSTRUCTIONS
 };
 
 SCM_API SCM scm_instruction_list (void);
diff --git a/libguile/objcodes.c b/libguile/objcodes.c
index 4f21971..a210553 100644
--- a/libguile/objcodes.c
+++ b/libguile/objcodes.c
@@ -28,13 +28,33 @@
 #include <sys/types.h>
 #include <assert.h>
 
+#include <verify.h>
+
 #include "_scm.h"
 #include "vm-bootstrap.h"
 #include "programs.h"
 #include "objcodes.h"
 
-/* nb, the length of the header should be a multiple of 8 bytes */
-#define OBJCODE_COOKIE "GOOF-0.6"
+/* The endianness marker in objcode.  */
+#ifdef WORDS_BIGENDIAN
+# define OBJCODE_ENDIANNESS "BE"
+#else
+# define OBJCODE_ENDIANNESS "LE"
+#endif
+
+#define _OBJCODE_STRINGIFY(x)  # x
+#define OBJCODE_STRINGIFY(x)   _OBJCODE_STRINGIFY (x)
+
+/* The word size marker in objcode.  */
+#define OBJCODE_WORD_SIZE  OBJCODE_STRINGIFY (SIZEOF_VOID_P)
+
+/* The objcode magic header.  */
+#define OBJCODE_COOKIE                                         \
+  "GOOF-0.6-" OBJCODE_ENDIANNESS "-" OBJCODE_WORD_SIZE "---"
+
+/* The length of the header must be a multiple of 8 bytes.  */
+verify (((sizeof (OBJCODE_COOKIE) - 1) & 7) == 0);
+
 
 
 /*
@@ -100,10 +120,10 @@ make_objcode_by_mmap (int fd)
 #undef FUNC_NAME
 
 SCM
-scm_c_make_objcode_slice (SCM parent, scm_t_uint8 *ptr)
+scm_c_make_objcode_slice (SCM parent, const scm_t_uint8 *ptr)
 #define FUNC_NAME "make-objcode-slice"
 {
-  struct scm_objcode *data, *parent_data;
+  const struct scm_objcode *data, *parent_data;
   SCM ret;
 
   SCM_VALIDATE_OBJCODE (1, parent);
@@ -118,6 +138,12 @@ scm_c_make_objcode_slice (SCM parent, scm_t_uint8 *ptr)
                                scm_from_uint32 (parent_data->len),
                                scm_from_uint32 (parent_data->metalen)));
 
+#if 0
+  /* FIXME: We currently generate bytecode where the objcode-meta isn't
+     suitable aligned, which is an issue on some arches (e.g., SPARC).  */
+  assert ((((uintptr_t) ptr) & (__alignof__ (struct scm_objcode) - 1UL)) == 0);
+#endif
+
   data = (struct scm_objcode*)ptr;
   if (data->base + data->len + data->metalen > parent_data->base + 
parent_data->len + parent_data->metalen)
     abort ();
diff --git a/libguile/objcodes.h b/libguile/objcodes.h
index 21e4add..e9b1cdb 100644
--- a/libguile/objcodes.h
+++ b/libguile/objcodes.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2009 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -56,7 +56,7 @@ SCM_API scm_t_bits scm_tc16_objcode;
 #define SCM_OBJCODE_IS_U8VECTOR(x) (SCM_SMOB_FLAGS (x) & 
SCM_F_OBJCODE_IS_U8VECTOR)
 #define SCM_OBJCODE_IS_SLICE(x) (SCM_SMOB_FLAGS (x) & SCM_F_OBJCODE_IS_SLICE)
 
-SCM scm_c_make_objcode_slice (SCM parent, scm_t_uint8 *ptr);
+SCM scm_c_make_objcode_slice (SCM parent, const scm_t_uint8 *ptr);
 SCM_API SCM scm_load_objcode (SCM file);
 SCM_API SCM scm_objcode_p (SCM obj);
 SCM_API SCM scm_objcode_meta (SCM objcode);
diff --git a/libguile/srfi-14.c b/libguile/srfi-14.c
index ff22f68..095a57a 100644
--- a/libguile/srfi-14.c
+++ b/libguile/srfi-14.c
@@ -30,6 +30,9 @@
 #include "libguile/srfi-14.h"
 #include "libguile/strings.h"
 
+/* Include the pre-computed standard charset data.  */
+#include "libguile/srfi-14.i.c"
+
 #define SCM_CHARSET_DATA(charset) ((scm_t_char_set *)SCM_SMOB_DATA (charset))
 
 #define SCM_CHARSET_SET(cs, idx)                \
@@ -1881,24 +1884,6 @@ SCM_DEFINE (scm_char_set_diff_plus_intersection_x, 
"char-set-diff+intersection!"
 }
 #undef FUNC_NAME
 
-
-SCM_DEFINE (scm_populate_standard_char_sets, "populate-standard-char-sets", 1, 
0, 0,
-            (SCM max),
-            "Populates the standard character sets with Unicode codepoints 
from\n"
-            "U+0000 to address@hidden  Useful values of @var{max} are 
@code{#x7F}\n"
-            "for ASCII, @code{#xFF} for Latin-1, @code{#xFFFF} for the Basic\n"
-            "Multilingual Plane, and @code{#x10FFFF} for all of Unicode.\n")
-#define FUNC_NAME s_populate_standard_char_sets
-{
-  int cmax;
-  SCM_VALIDATE_INT_COPY (1, max, cmax);
-
-  scm_srfi_14_compute_char_sets (cmax);
-  return SCM_UNSPECIFIED;
-}
-#undef FUNC_NAME
-
-
 
 /* Standard character sets.  */
 
@@ -1923,112 +1908,15 @@ SCM scm_char_set_full;
 
 /* Create an empty character set and return it after binding it to NAME.  */
 static inline SCM
-define_charset (const char *name)
+define_charset (const char *name, const scm_t_char_set *p)
 {
-  SCM cs = make_char_set (NULL);
+  SCM cs;
+
+  SCM_NEWSMOB (cs, scm_tc16_charset, p);
   scm_c_define (name, cs);
   return scm_permanent_object (cs);
 }
 
-/* Membership predicates for the various char sets.  */
-#define CSET_SYMBOL_PRED(c)      (uc_is_general_category_withtable (c, 
UC_CATEGORY_MASK_S))
-
-/* Note the explicit equality to 0xAD, which is the soft hyphen.
-   After Unicode 4.0, the soft-hyphen, which is usually invisible, has
-   been considered a formatting control character and not actual
-   puctuation.  But, SRFI-14 still calls it out as punctuation.  We
-   conform to SRFI-14, but, SRFI-14 is wrong.  */
-#define CSET_PUNCT_PRED(c)       (c == 0xAD \
-                                  || uc_is_general_category_withtable (c, 
UC_CATEGORY_MASK_P))
-#define CSET_BLANK_PRED(c)       (uc_is_general_category_withtable (c, 
UC_CATEGORY_MASK_Zs))
-#define CSET_LOWER_PRED(c)       (uc_is_general_category_withtable (c, 
UC_CATEGORY_MASK_Ll))
-#define CSET_UPPER_PRED(c)       (uc_is_general_category_withtable (c, 
UC_CATEGORY_MASK_Lu))
-#define CSET_TITLE_PRED(c)       (uc_is_general_category_withtable (c, 
UC_CATEGORY_MASK_Lt))
-#define CSET_LETTER_PRED(c)      (uc_is_general_category_withtable (c, 
UC_CATEGORY_MASK_L))
-#define CSET_DIGIT_PRED(c)       (uc_is_general_category_withtable (c, 
UC_CATEGORY_MASK_Nd))
-#define CSET_WHITESPACE_PRED(c)  (uc_is_property_white_space (c))
-#define CSET_CONTROL_PRED(c)     (uc_is_general_category_withtable (c, 
UC_CATEGORY_MASK_Cc))
-#define CSET_GRAPHIC_PRED(c)     (CSET_PUNCT_PRED(c) \
-                                  || uc_is_general_category_withtable (c, 
UC_CATEGORY_MASK_L \
-                                                                       | 
UC_CATEGORY_MASK_M \
-                                                                       | 
UC_CATEGORY_MASK_N \
-                                                                       | 
UC_CATEGORY_MASK_S))
-#define CSET_PRINTING_PRED(c)    (CSET_PUNCT_PRED(c) \
-                                  || uc_is_general_category_withtable (c, 
UC_CATEGORY_MASK_L \
-                                                                       | 
UC_CATEGORY_MASK_M \
-                                                                       | 
UC_CATEGORY_MASK_N \
-                                                                       | 
UC_CATEGORY_MASK_S) \
-                                  || uc_is_property_white_space (c))
-#define CSET_FULL_PRED(c)       (CSET_PUNCT_PRED(c)                     \
-                                 || uc_is_general_category_withtable (c, 
UC_CATEGORY_MASK_L \
-                                                                      | 
UC_CATEGORY_MASK_M \
-                                                                      | 
UC_CATEGORY_MASK_N \
-                                                                      | 
UC_CATEGORY_MASK_S \
-                                                                      | 
UC_CATEGORY_MASK_Z \
-                                                                      | 
UC_CATEGORY_MASK_Cc \
-                                                                      | 
UC_CATEGORY_MASK_Cf))
-
-#define CSET_HEX_DIGIT_PRED(c)   (uc_is_xdigit (c))
-#define CSET_ASCII_PRED(c)       (((c) >= '\0') && ((c) <= 127))
-
-/* Some char sets are explicitly defined by the SRFI as a union of other char
-   sets so we try to follow this closely.  */
-
-#define CSET_LETTER_AND_DIGIT_PRED(c)           \
-  (CSET_LETTER_PRED (c) || CSET_DIGIT_PRED (c))
-
-/* False and true predicates.  */
-#define CSET_TRUE_PRED(c)    (1)
-#define CSET_FALSE_PRED(c)   (0)
-
-
-/* Compute the contents of all the standard character sets.  This
- routine only computes as far as MAX.  For most cases, having the
- entire Unicode char sets is wasteful and expensive.  MAX would be
- 0xFF for Latin-1 or 0xFFFF for the Basic Multilingual Plane.*/
-void
-scm_srfi_14_compute_char_sets (scm_t_wchar max)
-{
-#define UPDATE_CSET(c, cset, pred)              \
-  do                                            \
-    {                                           \
-      if (pred (c))                             \
-        SCM_CHARSET_SET ((cset), (c));          \
-      else                                      \
-        SCM_CHARSET_UNSET ((cset), (c));        \
-    }                                           \
-  while (0)
-
-  register int ch;
-
-  /* This is wrong, of course.  It only iterates over the first MAX
-     codepoints.  But, rebuilding these over all of Unicode for each
-     locale change is very expensive.  */
-  for (ch = 0; ch <= max; ch++)
-    {
-      UPDATE_CSET (ch, scm_char_set_upper_case, CSET_UPPER_PRED);
-      UPDATE_CSET (ch, scm_char_set_lower_case, CSET_LOWER_PRED);
-      UPDATE_CSET (ch, scm_char_set_title_case, CSET_TITLE_PRED);
-      UPDATE_CSET (ch, scm_char_set_letter, CSET_LETTER_PRED);
-      UPDATE_CSET (ch, scm_char_set_digit, CSET_DIGIT_PRED);
-      UPDATE_CSET (ch, scm_char_set_letter_and_digit,
-                   CSET_LETTER_AND_DIGIT_PRED);
-      UPDATE_CSET (ch, scm_char_set_graphic, CSET_GRAPHIC_PRED);
-      UPDATE_CSET (ch, scm_char_set_printing, CSET_PRINTING_PRED);
-      UPDATE_CSET (ch, scm_char_set_whitespace, CSET_WHITESPACE_PRED);
-      UPDATE_CSET (ch, scm_char_set_iso_control, CSET_CONTROL_PRED);
-      UPDATE_CSET (ch, scm_char_set_punctuation, CSET_PUNCT_PRED);
-      UPDATE_CSET (ch, scm_char_set_symbol, CSET_SYMBOL_PRED);
-      UPDATE_CSET (ch, scm_char_set_hex_digit, CSET_HEX_DIGIT_PRED);
-      UPDATE_CSET (ch, scm_char_set_blank, CSET_BLANK_PRED);
-      UPDATE_CSET (ch, scm_char_set_ascii, CSET_ASCII_PRED);
-      UPDATE_CSET (ch, scm_char_set_empty, CSET_FALSE_PRED);
-      UPDATE_CSET (ch, scm_char_set_full, CSET_FULL_PRED);
-    }
-
-#undef UPDATE_CSET
-}
-
 #ifdef SCM_CHARSET_DEBUG
 SCM_DEFINE (scm_debug_char_set, "debug-char-set", 1, 0, 0,
            (SCM charset),
@@ -2069,25 +1957,24 @@ scm_init_srfi_14 (void)
   scm_set_smob_free (scm_tc16_charset_cursor, charset_cursor_free);
   scm_set_smob_print (scm_tc16_charset_cursor, charset_cursor_print);
 
-  scm_char_set_upper_case = define_charset ("char-set:upper-case"); 
-  scm_char_set_lower_case = define_charset ("char-set:lower-case"); 
-  scm_char_set_title_case = define_charset ("char-set:title-case");
-  scm_char_set_letter = define_charset ("char-set:letter");
-  scm_char_set_digit = define_charset ("char-set:digit");
-  scm_char_set_letter_and_digit = define_charset ("char-set:letter+digit");
-  scm_char_set_graphic = define_charset ("char-set:graphic");
-  scm_char_set_printing = define_charset ("char-set:printing");
-  scm_char_set_whitespace = define_charset ("char-set:whitespace");
-  scm_char_set_iso_control = define_charset ("char-set:iso-control");
-  scm_char_set_punctuation = define_charset ("char-set:punctuation");
-  scm_char_set_symbol = define_charset ("char-set:symbol");
-  scm_char_set_hex_digit = define_charset ("char-set:hex-digit");
-  scm_char_set_blank = define_charset ("char-set:blank");
-  scm_char_set_ascii = define_charset ("char-set:ascii");
-  scm_char_set_empty = define_charset ("char-set:empty");
-  scm_char_set_full = define_charset ("char-set:full");
-
-  scm_srfi_14_compute_char_sets (0xFFFF);
+  scm_char_set_upper_case = define_charset ("char-set:upper-case", 
&cs_upper_case); 
+  scm_char_set_lower_case = define_charset ("char-set:lower-case", 
&cs_lower_case); 
+  scm_char_set_title_case = define_charset ("char-set:title-case", 
&cs_title_case);
+  scm_char_set_letter = define_charset ("char-set:letter", &cs_letter);
+  scm_char_set_digit = define_charset ("char-set:digit", &cs_digit);
+  scm_char_set_letter_and_digit = define_charset ("char-set:letter+digit", 
&cs_letter_plus_digit);
+  scm_char_set_graphic = define_charset ("char-set:graphic", &cs_graphic);
+  scm_char_set_printing = define_charset ("char-set:printing", &cs_printing);
+  scm_char_set_whitespace = define_charset ("char-set:whitespace", 
&cs_whitespace);
+  scm_char_set_iso_control = define_charset ("char-set:iso-control", 
&cs_iso_control);
+  scm_char_set_punctuation = define_charset ("char-set:punctuation", 
&cs_punctuation);
+  scm_char_set_symbol = define_charset ("char-set:symbol", &cs_symbol);
+  scm_char_set_hex_digit = define_charset ("char-set:hex-digit", 
&cs_hex_digit);
+  scm_char_set_blank = define_charset ("char-set:blank", &cs_blank);
+  scm_char_set_ascii = define_charset ("char-set:ascii", &cs_ascii);
+  scm_char_set_empty = define_charset ("char-set:empty", &cs_empty);
+  scm_char_set_full = define_charset ("char-set:full", &cs_full);
+
 #include "libguile/srfi-14.x"
 }
 
diff --git a/libguile/srfi-14.h b/libguile/srfi-14.h
index 5a67a02..f030010 100644
--- a/libguile/srfi-14.h
+++ b/libguile/srfi-14.h
@@ -101,7 +101,6 @@ SCM_API SCM scm_char_set_intersection_x (SCM cs1, SCM rest);
 SCM_API SCM scm_char_set_difference_x (SCM cs1, SCM rest);
 SCM_API SCM scm_char_set_xor_x (SCM cs1, SCM rest);
 SCM_API SCM scm_char_set_diff_plus_intersection_x (SCM cs1, SCM cs2, SCM rest);
-SCM_API SCM scm_populate_standard_char_sets (SCM max);
 #if SCM_CHARSET_DEBUG
 SCM_API SCM scm_debug_char_set (SCM cs);
 #endif
@@ -124,7 +123,6 @@ SCM_API SCM scm_char_set_ascii;
 SCM_API SCM scm_char_set_empty;
 SCM_API SCM scm_char_set_full;
 
-SCM_INTERNAL void scm_srfi_14_compute_char_sets (scm_t_wchar max);
 SCM_INTERNAL void scm_init_srfi_14 (void);
 
 #endif /* SCM_SRFI_14_H */
diff --git a/libguile/srfi-14.i.c b/libguile/srfi-14.i.c
new file mode 100644
index 0000000..2e9c069
--- /dev/null
+++ b/libguile/srfi-14.i.c
@@ -0,0 +1,3655 @@
+/* srfi-14.i.c -- standard SRFI-14 character set data */
+
+/* This file is #include'd by srfi-14.c.  */
+
+/* This file was generated from 
http://unicode.org/Public/UNIDATA/UnicodeData.txt
+   with the unidata_to_charset.pl script.  */
+
+scm_t_char_range cs_lower_case_ranges[] = {
+  {0x0061, 0x007a},
+  {0x00b5, 0x00b5},
+  {0x00df, 0x00f6},
+  {0x00f8, 0x00ff},
+  {0x0101, 0x0101},
+  {0x0103, 0x0103},
+  {0x0105, 0x0105},
+  {0x0107, 0x0107},
+  {0x0109, 0x0109},
+  {0x010b, 0x010b},
+  {0x010d, 0x010d},
+  {0x010f, 0x010f},
+  {0x0111, 0x0111},
+  {0x0113, 0x0113},
+  {0x0115, 0x0115},
+  {0x0117, 0x0117},
+  {0x0119, 0x0119},
+  {0x011b, 0x011b},
+  {0x011d, 0x011d},
+  {0x011f, 0x011f},
+  {0x0121, 0x0121},
+  {0x0123, 0x0123},
+  {0x0125, 0x0125},
+  {0x0127, 0x0127},
+  {0x0129, 0x0129},
+  {0x012b, 0x012b},
+  {0x012d, 0x012d},
+  {0x012f, 0x012f},
+  {0x0131, 0x0131},
+  {0x0133, 0x0133},
+  {0x0135, 0x0135},
+  {0x0137, 0x0138},
+  {0x013a, 0x013a},
+  {0x013c, 0x013c},
+  {0x013e, 0x013e},
+  {0x0140, 0x0140},
+  {0x0142, 0x0142},
+  {0x0144, 0x0144},
+  {0x0146, 0x0146},
+  {0x0148, 0x0149},
+  {0x014b, 0x014b},
+  {0x014d, 0x014d},
+  {0x014f, 0x014f},
+  {0x0151, 0x0151},
+  {0x0153, 0x0153},
+  {0x0155, 0x0155},
+  {0x0157, 0x0157},
+  {0x0159, 0x0159},
+  {0x015b, 0x015b},
+  {0x015d, 0x015d},
+  {0x015f, 0x015f},
+  {0x0161, 0x0161},
+  {0x0163, 0x0163},
+  {0x0165, 0x0165},
+  {0x0167, 0x0167},
+  {0x0169, 0x0169},
+  {0x016b, 0x016b},
+  {0x016d, 0x016d},
+  {0x016f, 0x016f},
+  {0x0171, 0x0171},
+  {0x0173, 0x0173},
+  {0x0175, 0x0175},
+  {0x0177, 0x0177},
+  {0x017a, 0x017a},
+  {0x017c, 0x017c},
+  {0x017e, 0x0180},
+  {0x0183, 0x0183},
+  {0x0185, 0x0185},
+  {0x0188, 0x0188},
+  {0x018c, 0x018d},
+  {0x0192, 0x0192},
+  {0x0195, 0x0195},
+  {0x0199, 0x019b},
+  {0x019e, 0x019e},
+  {0x01a1, 0x01a1},
+  {0x01a3, 0x01a3},
+  {0x01a5, 0x01a5},
+  {0x01a8, 0x01a8},
+  {0x01ab, 0x01ab},
+  {0x01ad, 0x01ad},
+  {0x01b0, 0x01b0},
+  {0x01b4, 0x01b4},
+  {0x01b6, 0x01b6},
+  {0x01b9, 0x01ba},
+  {0x01bd, 0x01bd},
+  {0x01bf, 0x01bf},
+  {0x01c6, 0x01c6},
+  {0x01c9, 0x01c9},
+  {0x01cc, 0x01cc},
+  {0x01ce, 0x01ce},
+  {0x01d0, 0x01d0},
+  {0x01d2, 0x01d2},
+  {0x01d4, 0x01d4},
+  {0x01d6, 0x01d6},
+  {0x01d8, 0x01d8},
+  {0x01da, 0x01da},
+  {0x01dc, 0x01dd},
+  {0x01df, 0x01df},
+  {0x01e1, 0x01e1},
+  {0x01e3, 0x01e3},
+  {0x01e5, 0x01e5},
+  {0x01e7, 0x01e7},
+  {0x01e9, 0x01e9},
+  {0x01eb, 0x01eb},
+  {0x01ed, 0x01ed},
+  {0x01ef, 0x01f0},
+  {0x01f3, 0x01f3},
+  {0x01f5, 0x01f5},
+  {0x01f9, 0x01f9},
+  {0x01fb, 0x01fb},
+  {0x01fd, 0x01fd},
+  {0x01ff, 0x01ff},
+  {0x0201, 0x0201},
+  {0x0203, 0x0203},
+  {0x0205, 0x0205},
+  {0x0207, 0x0207},
+  {0x0209, 0x0209},
+  {0x020b, 0x020b},
+  {0x020d, 0x020d},
+  {0x020f, 0x020f},
+  {0x0211, 0x0211},
+  {0x0213, 0x0213},
+  {0x0215, 0x0215},
+  {0x0217, 0x0217},
+  {0x0219, 0x0219},
+  {0x021b, 0x021b},
+  {0x021d, 0x021d},
+  {0x021f, 0x021f},
+  {0x0221, 0x0221},
+  {0x0223, 0x0223},
+  {0x0225, 0x0225},
+  {0x0227, 0x0227},
+  {0x0229, 0x0229},
+  {0x022b, 0x022b},
+  {0x022d, 0x022d},
+  {0x022f, 0x022f},
+  {0x0231, 0x0231},
+  {0x0233, 0x0239},
+  {0x023c, 0x023c},
+  {0x023f, 0x0240},
+  {0x0242, 0x0242},
+  {0x0247, 0x0247},
+  {0x0249, 0x0249},
+  {0x024b, 0x024b},
+  {0x024d, 0x024d},
+  {0x024f, 0x0261},
+  {0x0263, 0x0269},
+  {0x026b, 0x0273},
+  {0x0275, 0x0275},
+  {0x0277, 0x0280},
+  {0x0282, 0x028e},
+  {0x0290, 0x0293},
+  {0x029a, 0x029a},
+  {0x029d, 0x029e},
+  {0x02a0, 0x02a0},
+  {0x02a3, 0x02ab},
+  {0x02ae, 0x02af},
+  {0x0345, 0x0345},
+  {0x0363, 0x036f},
+  {0x0371, 0x0371},
+  {0x0373, 0x0373},
+  {0x0377, 0x0377},
+  {0x037b, 0x037d},
+  {0x0390, 0x0390},
+  {0x03ac, 0x03ce},
+  {0x03d0, 0x03d1},
+  {0x03d5, 0x03d7},
+  {0x03d9, 0x03d9},
+  {0x03db, 0x03db},
+  {0x03dd, 0x03dd},
+  {0x03df, 0x03df},
+  {0x03e1, 0x03e1},
+  {0x03e3, 0x03e3},
+  {0x03e5, 0x03e5},
+  {0x03e7, 0x03e7},
+  {0x03e9, 0x03e9},
+  {0x03eb, 0x03eb},
+  {0x03ed, 0x03ed},
+  {0x03ef, 0x03f2},
+  {0x03f5, 0x03f5},
+  {0x03f8, 0x03f8},
+  {0x03fb, 0x03fb},
+  {0x0430, 0x045f},
+  {0x0461, 0x0461},
+  {0x0463, 0x0463},
+  {0x0465, 0x0465},
+  {0x0467, 0x0467},
+  {0x0469, 0x0469},
+  {0x046b, 0x046b},
+  {0x046d, 0x046d},
+  {0x046f, 0x046f},
+  {0x0471, 0x0471},
+  {0x0473, 0x0473},
+  {0x0475, 0x0475},
+  {0x0477, 0x0477},
+  {0x0479, 0x0479},
+  {0x047b, 0x047b},
+  {0x047d, 0x047d},
+  {0x047f, 0x047f},
+  {0x0481, 0x0481},
+  {0x048b, 0x048b},
+  {0x048d, 0x048d},
+  {0x048f, 0x048f},
+  {0x0491, 0x0491},
+  {0x0493, 0x0493},
+  {0x0495, 0x0495},
+  {0x0497, 0x0497},
+  {0x0499, 0x0499},
+  {0x049b, 0x049b},
+  {0x049d, 0x049d},
+  {0x049f, 0x049f},
+  {0x04a1, 0x04a1},
+  {0x04a3, 0x04a3},
+  {0x04a5, 0x04a5},
+  {0x04a7, 0x04a7},
+  {0x04a9, 0x04a9},
+  {0x04ab, 0x04ab},
+  {0x04ad, 0x04ad},
+  {0x04af, 0x04af},
+  {0x04b1, 0x04b1},
+  {0x04b3, 0x04b3},
+  {0x04b5, 0x04b5},
+  {0x04b7, 0x04b7},
+  {0x04b9, 0x04b9},
+  {0x04bb, 0x04bb},
+  {0x04bd, 0x04bd},
+  {0x04bf, 0x04bf},
+  {0x04c2, 0x04c2},
+  {0x04c4, 0x04c4},
+  {0x04c6, 0x04c6},
+  {0x04c8, 0x04c8},
+  {0x04ca, 0x04ca},
+  {0x04cc, 0x04cc},
+  {0x04ce, 0x04cf},
+  {0x04d1, 0x04d1},
+  {0x04d3, 0x04d3},
+  {0x04d5, 0x04d5},
+  {0x04d7, 0x04d7},
+  {0x04d9, 0x04d9},
+  {0x04db, 0x04db},
+  {0x04dd, 0x04dd},
+  {0x04df, 0x04df},
+  {0x04e1, 0x04e1},
+  {0x04e3, 0x04e3},
+  {0x04e5, 0x04e5},
+  {0x04e7, 0x04e7},
+  {0x04e9, 0x04e9},
+  {0x04eb, 0x04eb},
+  {0x04ed, 0x04ed},
+  {0x04ef, 0x04ef},
+  {0x04f1, 0x04f1},
+  {0x04f3, 0x04f3},
+  {0x04f5, 0x04f5},
+  {0x04f7, 0x04f7},
+  {0x04f9, 0x04f9},
+  {0x04fb, 0x04fb},
+  {0x04fd, 0x04fd},
+  {0x04ff, 0x04ff},
+  {0x0501, 0x0501},
+  {0x0503, 0x0503},
+  {0x0505, 0x0505},
+  {0x0507, 0x0507},
+  {0x0509, 0x0509},
+  {0x050b, 0x050b},
+  {0x050d, 0x050d},
+  {0x050f, 0x050f},
+  {0x0511, 0x0511},
+  {0x0513, 0x0513},
+  {0x0515, 0x0515},
+  {0x0517, 0x0517},
+  {0x0519, 0x0519},
+  {0x051b, 0x051b},
+  {0x051d, 0x051d},
+  {0x051f, 0x051f},
+  {0x0521, 0x0521},
+  {0x0523, 0x0523},
+  {0x0561, 0x0587},
+  {0x1930, 0x1938},
+  {0x1d02, 0x1d02},
+  {0x1d08, 0x1d09},
+  {0x1d11, 0x1d14},
+  {0x1d16, 0x1d17},
+  {0x1d1d, 0x1d1f},
+  {0x1d62, 0x1d77},
+  {0x1d79, 0x1d7a},
+  {0x1d7c, 0x1d7d},
+  {0x1d7f, 0x1d9a},
+  {0x1dca, 0x1dca},
+  {0x1dd3, 0x1dda},
+  {0x1ddc, 0x1ddd},
+  {0x1de0, 0x1de0},
+  {0x1de3, 0x1de6},
+  {0x1e01, 0x1e01},
+  {0x1e03, 0x1e03},
+  {0x1e05, 0x1e05},
+  {0x1e07, 0x1e07},
+  {0x1e09, 0x1e09},
+  {0x1e0b, 0x1e0b},
+  {0x1e0d, 0x1e0d},
+  {0x1e0f, 0x1e0f},
+  {0x1e11, 0x1e11},
+  {0x1e13, 0x1e13},
+  {0x1e15, 0x1e15},
+  {0x1e17, 0x1e17},
+  {0x1e19, 0x1e19},
+  {0x1e1b, 0x1e1b},
+  {0x1e1d, 0x1e1d},
+  {0x1e1f, 0x1e1f},
+  {0x1e21, 0x1e21},
+  {0x1e23, 0x1e23},
+  {0x1e25, 0x1e25},
+  {0x1e27, 0x1e27},
+  {0x1e29, 0x1e29},
+  {0x1e2b, 0x1e2b},
+  {0x1e2d, 0x1e2d},
+  {0x1e2f, 0x1e2f},
+  {0x1e31, 0x1e31},
+  {0x1e33, 0x1e33},
+  {0x1e35, 0x1e35},
+  {0x1e37, 0x1e37},
+  {0x1e39, 0x1e39},
+  {0x1e3b, 0x1e3b},
+  {0x1e3d, 0x1e3d},
+  {0x1e3f, 0x1e3f},
+  {0x1e41, 0x1e41},
+  {0x1e43, 0x1e43},
+  {0x1e45, 0x1e45},
+  {0x1e47, 0x1e47},
+  {0x1e49, 0x1e49},
+  {0x1e4b, 0x1e4b},
+  {0x1e4d, 0x1e4d},
+  {0x1e4f, 0x1e4f},
+  {0x1e51, 0x1e51},
+  {0x1e53, 0x1e53},
+  {0x1e55, 0x1e55},
+  {0x1e57, 0x1e57},
+  {0x1e59, 0x1e59},
+  {0x1e5b, 0x1e5b},
+  {0x1e5d, 0x1e5d},
+  {0x1e5f, 0x1e5f},
+  {0x1e61, 0x1e61},
+  {0x1e63, 0x1e63},
+  {0x1e65, 0x1e65},
+  {0x1e67, 0x1e67},
+  {0x1e69, 0x1e69},
+  {0x1e6b, 0x1e6b},
+  {0x1e6d, 0x1e6d},
+  {0x1e6f, 0x1e6f},
+  {0x1e71, 0x1e71},
+  {0x1e73, 0x1e73},
+  {0x1e75, 0x1e75},
+  {0x1e77, 0x1e77},
+  {0x1e79, 0x1e79},
+  {0x1e7b, 0x1e7b},
+  {0x1e7d, 0x1e7d},
+  {0x1e7f, 0x1e7f},
+  {0x1e81, 0x1e81},
+  {0x1e83, 0x1e83},
+  {0x1e85, 0x1e85},
+  {0x1e87, 0x1e87},
+  {0x1e89, 0x1e89},
+  {0x1e8b, 0x1e8b},
+  {0x1e8d, 0x1e8d},
+  {0x1e8f, 0x1e8f},
+  {0x1e91, 0x1e91},
+  {0x1e93, 0x1e93},
+  {0x1e95, 0x1e9d},
+  {0x1e9f, 0x1e9f},
+  {0x1ea1, 0x1ea1},
+  {0x1ea3, 0x1ea3},
+  {0x1ea5, 0x1ea5},
+  {0x1ea7, 0x1ea7},
+  {0x1ea9, 0x1ea9},
+  {0x1eab, 0x1eab},
+  {0x1ead, 0x1ead},
+  {0x1eaf, 0x1eaf},
+  {0x1eb1, 0x1eb1},
+  {0x1eb3, 0x1eb3},
+  {0x1eb5, 0x1eb5},
+  {0x1eb7, 0x1eb7},
+  {0x1eb9, 0x1eb9},
+  {0x1ebb, 0x1ebb},
+  {0x1ebd, 0x1ebd},
+  {0x1ebf, 0x1ebf},
+  {0x1ec1, 0x1ec1},
+  {0x1ec3, 0x1ec3},
+  {0x1ec5, 0x1ec5},
+  {0x1ec7, 0x1ec7},
+  {0x1ec9, 0x1ec9},
+  {0x1ecb, 0x1ecb},
+  {0x1ecd, 0x1ecd},
+  {0x1ecf, 0x1ecf},
+  {0x1ed1, 0x1ed1},
+  {0x1ed3, 0x1ed3},
+  {0x1ed5, 0x1ed5},
+  {0x1ed7, 0x1ed7},
+  {0x1ed9, 0x1ed9},
+  {0x1edb, 0x1edb},
+  {0x1edd, 0x1edd},
+  {0x1edf, 0x1edf},
+  {0x1ee1, 0x1ee1},
+  {0x1ee3, 0x1ee3},
+  {0x1ee5, 0x1ee5},
+  {0x1ee7, 0x1ee7},
+  {0x1ee9, 0x1ee9},
+  {0x1eeb, 0x1eeb},
+  {0x1eed, 0x1eed},
+  {0x1eef, 0x1eef},
+  {0x1ef1, 0x1ef1},
+  {0x1ef3, 0x1ef3},
+  {0x1ef5, 0x1ef5},
+  {0x1ef7, 0x1ef7},
+  {0x1ef9, 0x1ef9},
+  {0x1efb, 0x1efb},
+  {0x1efd, 0x1efd},
+  {0x1eff, 0x1f07},
+  {0x1f10, 0x1f15},
+  {0x1f20, 0x1f27},
+  {0x1f30, 0x1f37},
+  {0x1f40, 0x1f45},
+  {0x1f50, 0x1f57},
+  {0x1f60, 0x1f67},
+  {0x1f70, 0x1f7d},
+  {0x1f80, 0x1f87},
+  {0x1f90, 0x1f97},
+  {0x1fa0, 0x1fa7},
+  {0x1fb0, 0x1fb4},
+  {0x1fb6, 0x1fb7},
+  {0x1fbe, 0x1fbe},
+  {0x1fc2, 0x1fc4},
+  {0x1fc6, 0x1fc7},
+  {0x1fd0, 0x1fd3},
+  {0x1fd6, 0x1fd7},
+  {0x1fe0, 0x1fe7},
+  {0x1ff2, 0x1ff4},
+  {0x1ff6, 0x1ff7},
+  {0xa641, 0xa641},
+  {0xa643, 0xa643},
+  {0xa645, 0xa645},
+  {0xa647, 0xa647},
+  {0xa649, 0xa649},
+  {0xa64b, 0xa64b},
+  {0xa64d, 0xa64d},
+  {0xa64f, 0xa64f},
+  {0xa651, 0xa651},
+  {0xa653, 0xa653},
+  {0xa655, 0xa655},
+  {0xa657, 0xa657},
+  {0xa659, 0xa659},
+  {0xa65b, 0xa65b},
+  {0xa65d, 0xa65d},
+  {0xa65f, 0xa65f},
+  {0xa663, 0xa663},
+  {0xa665, 0xa665},
+  {0xa667, 0xa667},
+  {0xa669, 0xa669},
+  {0xa66b, 0xa66b},
+  {0xa66d, 0xa66d},
+  {0xa681, 0xa681},
+  {0xa683, 0xa683},
+  {0xa685, 0xa685},
+  {0xa687, 0xa687},
+  {0xa689, 0xa689},
+  {0xa68b, 0xa68b},
+  {0xa68d, 0xa68d},
+  {0xa68f, 0xa68f},
+  {0xa691, 0xa691},
+  {0xa693, 0xa693},
+  {0xa695, 0xa695},
+  {0xa697, 0xa697},
+  {0xa723, 0xa723},
+  {0xa725, 0xa725},
+  {0xa727, 0xa727},
+  {0xa729, 0xa729},
+  {0xa72b, 0xa72b},
+  {0xa72d, 0xa72d},
+  {0xa72f, 0xa72f},
+  {0xa733, 0xa733},
+  {0xa735, 0xa735},
+  {0xa737, 0xa737},
+  {0xa739, 0xa739},
+  {0xa73b, 0xa73b},
+  {0xa73d, 0xa73d},
+  {0xa73f, 0xa73f},
+  {0xa741, 0xa741},
+  {0xa743, 0xa743},
+  {0xa745, 0xa745},
+  {0xa747, 0xa747},
+  {0xa749, 0xa749},
+  {0xa74b, 0xa74b},
+  {0xa74d, 0xa74d},
+  {0xa74f, 0xa74f},
+  {0xa751, 0xa751},
+  {0xa753, 0xa753},
+  {0xa755, 0xa755},
+  {0xa757, 0xa757},
+  {0xa759, 0xa759},
+  {0xa75b, 0xa75b},
+  {0xa75d, 0xa75d},
+  {0xa75f, 0xa75f},
+  {0xa761, 0xa761},
+  {0xa763, 0xa763},
+  {0xa765, 0xa765},
+  {0xa767, 0xa767},
+  {0xa769, 0xa769},
+  {0xa76b, 0xa76b},
+  {0xa76d, 0xa76d},
+  {0xa76f, 0xa76f},
+  {0xa771, 0xa775},
+  {0xa777, 0xa778},
+  {0xa77a, 0xa77a},
+  {0xa77c, 0xa77c},
+  {0xa77f, 0xa77f},
+  {0xa781, 0xa781},
+  {0xa783, 0xa783},
+  {0xa785, 0xa785},
+  {0xa787, 0xa787},
+  {0xa78c, 0xa78c},
+  {0xfb00, 0xfb06},
+  {0xfb13, 0xfb17},
+  {0xff41, 0xff5a},
+  {0x10428, 0x1044f},
+  {0xe0061, 0xe007a},
+};
+
+scm_t_char_set cs_lower_case = {
+  523,
+  cs_lower_case_ranges
+};
+
+scm_t_char_range cs_upper_case_ranges[] = {
+  {0x0041, 0x005a},
+  {0x00c0, 0x00d6},
+  {0x00d8, 0x00de},
+  {0x0100, 0x0100},
+  {0x0102, 0x0102},
+  {0x0104, 0x0104},
+  {0x0106, 0x0106},
+  {0x0108, 0x0108},
+  {0x010a, 0x010a},
+  {0x010c, 0x010c},
+  {0x010e, 0x010e},
+  {0x0110, 0x0110},
+  {0x0112, 0x0112},
+  {0x0114, 0x0114},
+  {0x0116, 0x0116},
+  {0x0118, 0x0118},
+  {0x011a, 0x011a},
+  {0x011c, 0x011c},
+  {0x011e, 0x011e},
+  {0x0120, 0x0120},
+  {0x0122, 0x0122},
+  {0x0124, 0x0124},
+  {0x0126, 0x0126},
+  {0x0128, 0x0128},
+  {0x012a, 0x012a},
+  {0x012c, 0x012c},
+  {0x012e, 0x012e},
+  {0x0130, 0x0130},
+  {0x0132, 0x0132},
+  {0x0134, 0x0134},
+  {0x0136, 0x0136},
+  {0x0139, 0x0139},
+  {0x013b, 0x013b},
+  {0x013d, 0x013d},
+  {0x013f, 0x013f},
+  {0x0141, 0x0141},
+  {0x0143, 0x0143},
+  {0x0145, 0x0145},
+  {0x0147, 0x0147},
+  {0x014a, 0x014a},
+  {0x014c, 0x014c},
+  {0x014e, 0x014e},
+  {0x0150, 0x0150},
+  {0x0152, 0x0152},
+  {0x0154, 0x0154},
+  {0x0156, 0x0156},
+  {0x0158, 0x0158},
+  {0x015a, 0x015a},
+  {0x015c, 0x015c},
+  {0x015e, 0x015e},
+  {0x0160, 0x0160},
+  {0x0162, 0x0162},
+  {0x0164, 0x0164},
+  {0x0166, 0x0166},
+  {0x0168, 0x0168},
+  {0x016a, 0x016a},
+  {0x016c, 0x016c},
+  {0x016e, 0x016e},
+  {0x0170, 0x0170},
+  {0x0172, 0x0172},
+  {0x0174, 0x0174},
+  {0x0176, 0x0176},
+  {0x0178, 0x0179},
+  {0x017b, 0x017b},
+  {0x017d, 0x017d},
+  {0x0181, 0x0182},
+  {0x0184, 0x0184},
+  {0x0186, 0x0187},
+  {0x0189, 0x018b},
+  {0x018e, 0x0191},
+  {0x0193, 0x0194},
+  {0x0196, 0x0198},
+  {0x019c, 0x019d},
+  {0x019f, 0x01a0},
+  {0x01a2, 0x01a2},
+  {0x01a4, 0x01a4},
+  {0x01a6, 0x01a7},
+  {0x01a9, 0x01a9},
+  {0x01ac, 0x01ac},
+  {0x01ae, 0x01af},
+  {0x01b1, 0x01b3},
+  {0x01b5, 0x01b5},
+  {0x01b7, 0x01b8},
+  {0x01bc, 0x01bc},
+  {0x01c4, 0x01c4},
+  {0x01c7, 0x01c7},
+  {0x01ca, 0x01ca},
+  {0x01cd, 0x01cd},
+  {0x01cf, 0x01cf},
+  {0x01d1, 0x01d1},
+  {0x01d3, 0x01d3},
+  {0x01d5, 0x01d5},
+  {0x01d7, 0x01d7},
+  {0x01d9, 0x01d9},
+  {0x01db, 0x01db},
+  {0x01de, 0x01de},
+  {0x01e0, 0x01e0},
+  {0x01e2, 0x01e2},
+  {0x01e4, 0x01e4},
+  {0x01e6, 0x01e6},
+  {0x01e8, 0x01e8},
+  {0x01ea, 0x01ea},
+  {0x01ec, 0x01ec},
+  {0x01ee, 0x01ee},
+  {0x01f1, 0x01f1},
+  {0x01f4, 0x01f4},
+  {0x01f6, 0x01f8},
+  {0x01fa, 0x01fa},
+  {0x01fc, 0x01fc},
+  {0x01fe, 0x01fe},
+  {0x0200, 0x0200},
+  {0x0202, 0x0202},
+  {0x0204, 0x0204},
+  {0x0206, 0x0206},
+  {0x0208, 0x0208},
+  {0x020a, 0x020a},
+  {0x020c, 0x020c},
+  {0x020e, 0x020e},
+  {0x0210, 0x0210},
+  {0x0212, 0x0212},
+  {0x0214, 0x0214},
+  {0x0216, 0x0216},
+  {0x0218, 0x0218},
+  {0x021a, 0x021a},
+  {0x021c, 0x021c},
+  {0x021e, 0x021e},
+  {0x0220, 0x0220},
+  {0x0222, 0x0222},
+  {0x0224, 0x0224},
+  {0x0226, 0x0226},
+  {0x0228, 0x0228},
+  {0x022a, 0x022a},
+  {0x022c, 0x022c},
+  {0x022e, 0x022e},
+  {0x0230, 0x0230},
+  {0x0232, 0x0232},
+  {0x023a, 0x023b},
+  {0x023d, 0x023e},
+  {0x0241, 0x0241},
+  {0x0243, 0x0246},
+  {0x0248, 0x0248},
+  {0x024a, 0x024a},
+  {0x024c, 0x024c},
+  {0x024e, 0x024e},
+  {0x0370, 0x0370},
+  {0x0372, 0x0372},
+  {0x0376, 0x0376},
+  {0x0386, 0x0386},
+  {0x0388, 0x038a},
+  {0x038c, 0x038c},
+  {0x038e, 0x038f},
+  {0x0391, 0x03a1},
+  {0x03a3, 0x03ab},
+  {0x03cf, 0x03cf},
+  {0x03d8, 0x03d8},
+  {0x03da, 0x03da},
+  {0x03dc, 0x03dc},
+  {0x03de, 0x03de},
+  {0x03e0, 0x03e0},
+  {0x03e2, 0x03e2},
+  {0x03e4, 0x03e4},
+  {0x03e6, 0x03e6},
+  {0x03e8, 0x03e8},
+  {0x03ea, 0x03ea},
+  {0x03ec, 0x03ec},
+  {0x03ee, 0x03ee},
+  {0x03f4, 0x03f4},
+  {0x03f7, 0x03f7},
+  {0x03f9, 0x03fa},
+  {0x03fd, 0x042f},
+  {0x0460, 0x0460},
+  {0x0462, 0x0462},
+  {0x0464, 0x0464},
+  {0x0466, 0x0466},
+  {0x0468, 0x0468},
+  {0x046a, 0x046a},
+  {0x046c, 0x046c},
+  {0x046e, 0x046e},
+  {0x0470, 0x0470},
+  {0x0472, 0x0472},
+  {0x0474, 0x0474},
+  {0x0476, 0x0476},
+  {0x0478, 0x0478},
+  {0x047a, 0x047a},
+  {0x047c, 0x047c},
+  {0x047e, 0x047e},
+  {0x0480, 0x0480},
+  {0x048a, 0x048a},
+  {0x048c, 0x048c},
+  {0x048e, 0x048e},
+  {0x0490, 0x0490},
+  {0x0492, 0x0492},
+  {0x0494, 0x0494},
+  {0x0496, 0x0496},
+  {0x0498, 0x0498},
+  {0x049a, 0x049a},
+  {0x049c, 0x049c},
+  {0x049e, 0x049e},
+  {0x04a0, 0x04a0},
+  {0x04a2, 0x04a2},
+  {0x04a4, 0x04a4},
+  {0x04a6, 0x04a6},
+  {0x04a8, 0x04a8},
+  {0x04aa, 0x04aa},
+  {0x04ac, 0x04ac},
+  {0x04ae, 0x04ae},
+  {0x04b0, 0x04b0},
+  {0x04b2, 0x04b2},
+  {0x04b4, 0x04b4},
+  {0x04b6, 0x04b6},
+  {0x04b8, 0x04b8},
+  {0x04ba, 0x04ba},
+  {0x04bc, 0x04bc},
+  {0x04be, 0x04be},
+  {0x04c0, 0x04c1},
+  {0x04c3, 0x04c3},
+  {0x04c5, 0x04c5},
+  {0x04c7, 0x04c7},
+  {0x04c9, 0x04c9},
+  {0x04cb, 0x04cb},
+  {0x04cd, 0x04cd},
+  {0x04d0, 0x04d0},
+  {0x04d2, 0x04d2},
+  {0x04d4, 0x04d4},
+  {0x04d6, 0x04d6},
+  {0x04d8, 0x04d8},
+  {0x04da, 0x04da},
+  {0x04dc, 0x04dc},
+  {0x04de, 0x04de},
+  {0x04e0, 0x04e0},
+  {0x04e2, 0x04e2},
+  {0x04e4, 0x04e4},
+  {0x04e6, 0x04e6},
+  {0x04e8, 0x04e8},
+  {0x04ea, 0x04ea},
+  {0x04ec, 0x04ec},
+  {0x04ee, 0x04ee},
+  {0x04f0, 0x04f0},
+  {0x04f2, 0x04f2},
+  {0x04f4, 0x04f4},
+  {0x04f6, 0x04f6},
+  {0x04f8, 0x04f8},
+  {0x04fa, 0x04fa},
+  {0x04fc, 0x04fc},
+  {0x04fe, 0x04fe},
+  {0x0500, 0x0500},
+  {0x0502, 0x0502},
+  {0x0504, 0x0504},
+  {0x0506, 0x0506},
+  {0x0508, 0x0508},
+  {0x050a, 0x050a},
+  {0x050c, 0x050c},
+  {0x050e, 0x050e},
+  {0x0510, 0x0510},
+  {0x0512, 0x0512},
+  {0x0514, 0x0514},
+  {0x0516, 0x0516},
+  {0x0518, 0x0518},
+  {0x051a, 0x051a},
+  {0x051c, 0x051c},
+  {0x051e, 0x051e},
+  {0x0520, 0x0520},
+  {0x0522, 0x0522},
+  {0x0531, 0x0556},
+  {0x10a0, 0x10c5},
+  {0x1d7b, 0x1d7b},
+  {0x1d7e, 0x1d7e},
+  {0x1e00, 0x1e00},
+  {0x1e02, 0x1e02},
+  {0x1e04, 0x1e04},
+  {0x1e06, 0x1e06},
+  {0x1e08, 0x1e08},
+  {0x1e0a, 0x1e0a},
+  {0x1e0c, 0x1e0c},
+  {0x1e0e, 0x1e0e},
+  {0x1e10, 0x1e10},
+  {0x1e12, 0x1e12},
+  {0x1e14, 0x1e14},
+  {0x1e16, 0x1e16},
+  {0x1e18, 0x1e18},
+  {0x1e1a, 0x1e1a},
+  {0x1e1c, 0x1e1c},
+  {0x1e1e, 0x1e1e},
+  {0x1e20, 0x1e20},
+  {0x1e22, 0x1e22},
+  {0x1e24, 0x1e24},
+  {0x1e26, 0x1e26},
+  {0x1e28, 0x1e28},
+  {0x1e2a, 0x1e2a},
+  {0x1e2c, 0x1e2c},
+  {0x1e2e, 0x1e2e},
+  {0x1e30, 0x1e30},
+  {0x1e32, 0x1e32},
+  {0x1e34, 0x1e34},
+  {0x1e36, 0x1e36},
+  {0x1e38, 0x1e38},
+  {0x1e3a, 0x1e3a},
+  {0x1e3c, 0x1e3c},
+  {0x1e3e, 0x1e3e},
+  {0x1e40, 0x1e40},
+  {0x1e42, 0x1e42},
+  {0x1e44, 0x1e44},
+  {0x1e46, 0x1e46},
+  {0x1e48, 0x1e48},
+  {0x1e4a, 0x1e4a},
+  {0x1e4c, 0x1e4c},
+  {0x1e4e, 0x1e4e},
+  {0x1e50, 0x1e50},
+  {0x1e52, 0x1e52},
+  {0x1e54, 0x1e54},
+  {0x1e56, 0x1e56},
+  {0x1e58, 0x1e58},
+  {0x1e5a, 0x1e5a},
+  {0x1e5c, 0x1e5c},
+  {0x1e5e, 0x1e5e},
+  {0x1e60, 0x1e60},
+  {0x1e62, 0x1e62},
+  {0x1e64, 0x1e64},
+  {0x1e66, 0x1e66},
+  {0x1e68, 0x1e68},
+  {0x1e6a, 0x1e6a},
+  {0x1e6c, 0x1e6c},
+  {0x1e6e, 0x1e6e},
+  {0x1e70, 0x1e70},
+  {0x1e72, 0x1e72},
+  {0x1e74, 0x1e74},
+  {0x1e76, 0x1e76},
+  {0x1e78, 0x1e78},
+  {0x1e7a, 0x1e7a},
+  {0x1e7c, 0x1e7c},
+  {0x1e7e, 0x1e7e},
+  {0x1e80, 0x1e80},
+  {0x1e82, 0x1e82},
+  {0x1e84, 0x1e84},
+  {0x1e86, 0x1e86},
+  {0x1e88, 0x1e88},
+  {0x1e8a, 0x1e8a},
+  {0x1e8c, 0x1e8c},
+  {0x1e8e, 0x1e8e},
+  {0x1e90, 0x1e90},
+  {0x1e92, 0x1e92},
+  {0x1e94, 0x1e94},
+  {0x1e9e, 0x1e9e},
+  {0x1ea0, 0x1ea0},
+  {0x1ea2, 0x1ea2},
+  {0x1ea4, 0x1ea4},
+  {0x1ea6, 0x1ea6},
+  {0x1ea8, 0x1ea8},
+  {0x1eaa, 0x1eaa},
+  {0x1eac, 0x1eac},
+  {0x1eae, 0x1eae},
+  {0x1eb0, 0x1eb0},
+  {0x1eb2, 0x1eb2},
+  {0x1eb4, 0x1eb4},
+  {0x1eb6, 0x1eb6},
+  {0x1eb8, 0x1eb8},
+  {0x1eba, 0x1eba},
+  {0x1ebc, 0x1ebc},
+  {0x1ebe, 0x1ebe},
+  {0x1ec0, 0x1ec0},
+  {0x1ec2, 0x1ec2},
+  {0x1ec4, 0x1ec4},
+  {0x1ec6, 0x1ec6},
+  {0x1ec8, 0x1ec8},
+  {0x1eca, 0x1eca},
+  {0x1ecc, 0x1ecc},
+  {0x1ece, 0x1ece},
+  {0x1ed0, 0x1ed0},
+  {0x1ed2, 0x1ed2},
+  {0x1ed4, 0x1ed4},
+  {0x1ed6, 0x1ed6},
+  {0x1ed8, 0x1ed8},
+  {0x1eda, 0x1eda},
+  {0x1edc, 0x1edc},
+  {0x1ede, 0x1ede},
+  {0x1ee0, 0x1ee0},
+  {0x1ee2, 0x1ee2},
+  {0x1ee4, 0x1ee4},
+  {0x1ee6, 0x1ee6},
+  {0x1ee8, 0x1ee8},
+  {0x1eea, 0x1eea},
+  {0x1eec, 0x1eec},
+  {0x1eee, 0x1eee},
+  {0x1ef0, 0x1ef0},
+  {0x1ef2, 0x1ef2},
+  {0x1ef4, 0x1ef4},
+  {0x1ef6, 0x1ef6},
+  {0x1ef8, 0x1ef8},
+  {0x1efa, 0x1efa},
+  {0x1efc, 0x1efc},
+  {0x1efe, 0x1efe},
+  {0x1f08, 0x1f0f},
+  {0x1f18, 0x1f1d},
+  {0x1f28, 0x1f2f},
+  {0x1f38, 0x1f3f},
+  {0x1f48, 0x1f4d},
+  {0x1f59, 0x1f59},
+  {0x1f5b, 0x1f5b},
+  {0x1f5d, 0x1f5d},
+  {0x1f5f, 0x1f5f},
+  {0x1f68, 0x1f6f},
+  {0x1f88, 0x1f8f},
+  {0x1f98, 0x1f9f},
+  {0x1fa8, 0x1faf},
+  {0x1fb8, 0x1fbc},
+  {0x1fc8, 0x1fcc},
+  {0x1fd8, 0x1fdb},
+  {0x1fe8, 0x1fec},
+  {0x1ff8, 0x1ffc},
+  {0xa640, 0xa640},
+  {0xa642, 0xa642},
+  {0xa644, 0xa644},
+  {0xa646, 0xa646},
+  {0xa648, 0xa648},
+  {0xa64a, 0xa64a},
+  {0xa64c, 0xa64c},
+  {0xa64e, 0xa64e},
+  {0xa650, 0xa650},
+  {0xa652, 0xa652},
+  {0xa654, 0xa654},
+  {0xa656, 0xa656},
+  {0xa658, 0xa658},
+  {0xa65a, 0xa65a},
+  {0xa65c, 0xa65c},
+  {0xa65e, 0xa65e},
+  {0xa662, 0xa662},
+  {0xa664, 0xa664},
+  {0xa666, 0xa666},
+  {0xa668, 0xa668},
+  {0xa66a, 0xa66a},
+  {0xa66c, 0xa66c},
+  {0xa680, 0xa680},
+  {0xa682, 0xa682},
+  {0xa684, 0xa684},
+  {0xa686, 0xa686},
+  {0xa688, 0xa688},
+  {0xa68a, 0xa68a},
+  {0xa68c, 0xa68c},
+  {0xa68e, 0xa68e},
+  {0xa690, 0xa690},
+  {0xa692, 0xa692},
+  {0xa694, 0xa694},
+  {0xa696, 0xa696},
+  {0xa722, 0xa722},
+  {0xa724, 0xa724},
+  {0xa726, 0xa726},
+  {0xa728, 0xa728},
+  {0xa72a, 0xa72a},
+  {0xa72c, 0xa72c},
+  {0xa72e, 0xa72e},
+  {0xa732, 0xa732},
+  {0xa734, 0xa734},
+  {0xa736, 0xa736},
+  {0xa738, 0xa738},
+  {0xa73a, 0xa73a},
+  {0xa73c, 0xa73c},
+  {0xa73e, 0xa73e},
+  {0xa740, 0xa740},
+  {0xa742, 0xa742},
+  {0xa744, 0xa744},
+  {0xa746, 0xa746},
+  {0xa748, 0xa748},
+  {0xa74a, 0xa74a},
+  {0xa74c, 0xa74c},
+  {0xa74e, 0xa74e},
+  {0xa750, 0xa750},
+  {0xa752, 0xa752},
+  {0xa754, 0xa754},
+  {0xa756, 0xa756},
+  {0xa758, 0xa758},
+  {0xa75a, 0xa75a},
+  {0xa75c, 0xa75c},
+  {0xa75e, 0xa75e},
+  {0xa760, 0xa760},
+  {0xa762, 0xa762},
+  {0xa764, 0xa764},
+  {0xa766, 0xa766},
+  {0xa768, 0xa768},
+  {0xa76a, 0xa76a},
+  {0xa76c, 0xa76c},
+  {0xa76e, 0xa76e},
+  {0xa779, 0xa779},
+  {0xa77b, 0xa77b},
+  {0xa77d, 0xa77e},
+  {0xa780, 0xa780},
+  {0xa782, 0xa782},
+  {0xa784, 0xa784},
+  {0xa786, 0xa786},
+  {0xa78b, 0xa78b},
+  {0xff21, 0xff3a},
+  {0x10400, 0x10427},
+  {0xe0041, 0xe005a},
+};
+
+scm_t_char_set cs_upper_case = {
+  492,
+  cs_upper_case_ranges
+};
+
+scm_t_char_range cs_title_case_ranges[] = {
+  {0x01c5, 0x01c5},
+  {0x01c8, 0x01c8},
+  {0x01cb, 0x01cb},
+  {0x01f2, 0x01f2},
+  {0x1f88, 0x1f8f},
+  {0x1f98, 0x1f9f},
+  {0x1fa8, 0x1faf},
+  {0x1fbc, 0x1fbc},
+  {0x1fcc, 0x1fcc},
+  {0x1ffc, 0x1ffc},
+};
+
+scm_t_char_set cs_title_case = {
+  10,
+  cs_title_case_ranges
+};
+
+scm_t_char_range cs_letter_ranges[] = {
+  {0x0041, 0x005a},
+  {0x0061, 0x007a},
+  {0x00aa, 0x00aa},
+  {0x00b5, 0x00b5},
+  {0x00ba, 0x00ba},
+  {0x00c0, 0x00d6},
+  {0x00d8, 0x00f6},
+  {0x00f8, 0x02c1},
+  {0x02c6, 0x02d1},
+  {0x02e0, 0x02e4},
+  {0x02ec, 0x02ec},
+  {0x02ee, 0x02ee},
+  {0x0370, 0x0374},
+  {0x0376, 0x0377},
+  {0x037a, 0x037d},
+  {0x0386, 0x0386},
+  {0x0388, 0x038a},
+  {0x038c, 0x038c},
+  {0x038e, 0x03a1},
+  {0x03a3, 0x03f5},
+  {0x03f7, 0x0481},
+  {0x048a, 0x0523},
+  {0x0531, 0x0556},
+  {0x0559, 0x0559},
+  {0x0561, 0x0587},
+  {0x05d0, 0x05ea},
+  {0x05f0, 0x05f2},
+  {0x0621, 0x064a},
+  {0x066e, 0x066f},
+  {0x0671, 0x06d3},
+  {0x06d5, 0x06d5},
+  {0x06e5, 0x06e6},
+  {0x06ee, 0x06ef},
+  {0x06fa, 0x06fc},
+  {0x06ff, 0x06ff},
+  {0x0710, 0x0710},
+  {0x0712, 0x072f},
+  {0x074d, 0x07a5},
+  {0x07b1, 0x07b1},
+  {0x07ca, 0x07ea},
+  {0x07f4, 0x07f5},
+  {0x07fa, 0x07fa},
+  {0x0904, 0x0939},
+  {0x093d, 0x093d},
+  {0x0950, 0x0950},
+  {0x0958, 0x0961},
+  {0x0971, 0x0972},
+  {0x097b, 0x097f},
+  {0x0985, 0x098c},
+  {0x098f, 0x0990},
+  {0x0993, 0x09a8},
+  {0x09aa, 0x09b0},
+  {0x09b2, 0x09b2},
+  {0x09b6, 0x09b9},
+  {0x09bd, 0x09bd},
+  {0x09ce, 0x09ce},
+  {0x09dc, 0x09dd},
+  {0x09df, 0x09e1},
+  {0x09f0, 0x09f1},
+  {0x0a05, 0x0a0a},
+  {0x0a0f, 0x0a10},
+  {0x0a13, 0x0a28},
+  {0x0a2a, 0x0a30},
+  {0x0a32, 0x0a33},
+  {0x0a35, 0x0a36},
+  {0x0a38, 0x0a39},
+  {0x0a59, 0x0a5c},
+  {0x0a5e, 0x0a5e},
+  {0x0a72, 0x0a74},
+  {0x0a85, 0x0a8d},
+  {0x0a8f, 0x0a91},
+  {0x0a93, 0x0aa8},
+  {0x0aaa, 0x0ab0},
+  {0x0ab2, 0x0ab3},
+  {0x0ab5, 0x0ab9},
+  {0x0abd, 0x0abd},
+  {0x0ad0, 0x0ad0},
+  {0x0ae0, 0x0ae1},
+  {0x0b05, 0x0b0c},
+  {0x0b0f, 0x0b10},
+  {0x0b13, 0x0b28},
+  {0x0b2a, 0x0b30},
+  {0x0b32, 0x0b33},
+  {0x0b35, 0x0b39},
+  {0x0b3d, 0x0b3d},
+  {0x0b5c, 0x0b5d},
+  {0x0b5f, 0x0b61},
+  {0x0b71, 0x0b71},
+  {0x0b83, 0x0b83},
+  {0x0b85, 0x0b8a},
+  {0x0b8e, 0x0b90},
+  {0x0b92, 0x0b95},
+  {0x0b99, 0x0b9a},
+  {0x0b9c, 0x0b9c},
+  {0x0b9e, 0x0b9f},
+  {0x0ba3, 0x0ba4},
+  {0x0ba8, 0x0baa},
+  {0x0bae, 0x0bb9},
+  {0x0bd0, 0x0bd0},
+  {0x0c05, 0x0c0c},
+  {0x0c0e, 0x0c10},
+  {0x0c12, 0x0c28},
+  {0x0c2a, 0x0c33},
+  {0x0c35, 0x0c39},
+  {0x0c3d, 0x0c3d},
+  {0x0c58, 0x0c59},
+  {0x0c60, 0x0c61},
+  {0x0c85, 0x0c8c},
+  {0x0c8e, 0x0c90},
+  {0x0c92, 0x0ca8},
+  {0x0caa, 0x0cb3},
+  {0x0cb5, 0x0cb9},
+  {0x0cbd, 0x0cbd},
+  {0x0cde, 0x0cde},
+  {0x0ce0, 0x0ce1},
+  {0x0d05, 0x0d0c},
+  {0x0d0e, 0x0d10},
+  {0x0d12, 0x0d28},
+  {0x0d2a, 0x0d39},
+  {0x0d3d, 0x0d3d},
+  {0x0d60, 0x0d61},
+  {0x0d7a, 0x0d7f},
+  {0x0d85, 0x0d96},
+  {0x0d9a, 0x0db1},
+  {0x0db3, 0x0dbb},
+  {0x0dbd, 0x0dbd},
+  {0x0dc0, 0x0dc6},
+  {0x0e01, 0x0e30},
+  {0x0e32, 0x0e33},
+  {0x0e40, 0x0e46},
+  {0x0e81, 0x0e82},
+  {0x0e84, 0x0e84},
+  {0x0e87, 0x0e88},
+  {0x0e8a, 0x0e8a},
+  {0x0e8d, 0x0e8d},
+  {0x0e94, 0x0e97},
+  {0x0e99, 0x0e9f},
+  {0x0ea1, 0x0ea3},
+  {0x0ea5, 0x0ea5},
+  {0x0ea7, 0x0ea7},
+  {0x0eaa, 0x0eab},
+  {0x0ead, 0x0eb0},
+  {0x0eb2, 0x0eb3},
+  {0x0ebd, 0x0ebd},
+  {0x0ec0, 0x0ec4},
+  {0x0ec6, 0x0ec6},
+  {0x0edc, 0x0edd},
+  {0x0f00, 0x0f00},
+  {0x0f40, 0x0f47},
+  {0x0f49, 0x0f6c},
+  {0x0f88, 0x0f8b},
+  {0x1000, 0x102a},
+  {0x103f, 0x103f},
+  {0x1050, 0x1055},
+  {0x105a, 0x105d},
+  {0x1061, 0x1061},
+  {0x1065, 0x1066},
+  {0x106e, 0x1070},
+  {0x1075, 0x1081},
+  {0x108e, 0x108e},
+  {0x10a0, 0x10c5},
+  {0x10d0, 0x10fa},
+  {0x10fc, 0x10fc},
+  {0x1100, 0x1159},
+  {0x115f, 0x11a2},
+  {0x11a8, 0x11f9},
+  {0x1200, 0x1248},
+  {0x124a, 0x124d},
+  {0x1250, 0x1256},
+  {0x1258, 0x1258},
+  {0x125a, 0x125d},
+  {0x1260, 0x1288},
+  {0x128a, 0x128d},
+  {0x1290, 0x12b0},
+  {0x12b2, 0x12b5},
+  {0x12b8, 0x12be},
+  {0x12c0, 0x12c0},
+  {0x12c2, 0x12c5},
+  {0x12c8, 0x12d6},
+  {0x12d8, 0x1310},
+  {0x1312, 0x1315},
+  {0x1318, 0x135a},
+  {0x1380, 0x138f},
+  {0x13a0, 0x13f4},
+  {0x1401, 0x166c},
+  {0x166f, 0x1676},
+  {0x1681, 0x169a},
+  {0x16a0, 0x16ea},
+  {0x1700, 0x170c},
+  {0x170e, 0x1711},
+  {0x1720, 0x1731},
+  {0x1740, 0x1751},
+  {0x1760, 0x176c},
+  {0x176e, 0x1770},
+  {0x1780, 0x17b3},
+  {0x17d7, 0x17d7},
+  {0x17dc, 0x17dc},
+  {0x1820, 0x1877},
+  {0x1880, 0x18a8},
+  {0x18aa, 0x18aa},
+  {0x1900, 0x191c},
+  {0x1950, 0x196d},
+  {0x1970, 0x1974},
+  {0x1980, 0x19a9},
+  {0x19c1, 0x19c7},
+  {0x1a00, 0x1a16},
+  {0x1b05, 0x1b33},
+  {0x1b45, 0x1b4b},
+  {0x1b83, 0x1ba0},
+  {0x1bae, 0x1baf},
+  {0x1c00, 0x1c23},
+  {0x1c4d, 0x1c4f},
+  {0x1c5a, 0x1c7d},
+  {0x1d00, 0x1dbf},
+  {0x1e00, 0x1f15},
+  {0x1f18, 0x1f1d},
+  {0x1f20, 0x1f45},
+  {0x1f48, 0x1f4d},
+  {0x1f50, 0x1f57},
+  {0x1f59, 0x1f59},
+  {0x1f5b, 0x1f5b},
+  {0x1f5d, 0x1f5d},
+  {0x1f5f, 0x1f7d},
+  {0x1f80, 0x1fb4},
+  {0x1fb6, 0x1fbc},
+  {0x1fbe, 0x1fbe},
+  {0x1fc2, 0x1fc4},
+  {0x1fc6, 0x1fcc},
+  {0x1fd0, 0x1fd3},
+  {0x1fd6, 0x1fdb},
+  {0x1fe0, 0x1fec},
+  {0x1ff2, 0x1ff4},
+  {0x1ff6, 0x1ffc},
+  {0x2071, 0x2071},
+  {0x207f, 0x207f},
+  {0x2090, 0x2094},
+  {0x2102, 0x2102},
+  {0x2107, 0x2107},
+  {0x210a, 0x2113},
+  {0x2115, 0x2115},
+  {0x2119, 0x211d},
+  {0x2124, 0x2124},
+  {0x2126, 0x2126},
+  {0x2128, 0x2128},
+  {0x212a, 0x212d},
+  {0x212f, 0x2139},
+  {0x213c, 0x213f},
+  {0x2145, 0x2149},
+  {0x214e, 0x214e},
+  {0x2183, 0x2184},
+  {0x2c00, 0x2c2e},
+  {0x2c30, 0x2c5e},
+  {0x2c60, 0x2c6f},
+  {0x2c71, 0x2c7d},
+  {0x2c80, 0x2ce4},
+  {0x2d00, 0x2d25},
+  {0x2d30, 0x2d65},
+  {0x2d6f, 0x2d6f},
+  {0x2d80, 0x2d96},
+  {0x2da0, 0x2da6},
+  {0x2da8, 0x2dae},
+  {0x2db0, 0x2db6},
+  {0x2db8, 0x2dbe},
+  {0x2dc0, 0x2dc6},
+  {0x2dc8, 0x2dce},
+  {0x2dd0, 0x2dd6},
+  {0x2dd8, 0x2dde},
+  {0x2e2f, 0x2e2f},
+  {0x3005, 0x3006},
+  {0x3031, 0x3035},
+  {0x303b, 0x303c},
+  {0x3041, 0x3096},
+  {0x309d, 0x309f},
+  {0x30a1, 0x30fa},
+  {0x30fc, 0x30ff},
+  {0x3105, 0x312d},
+  {0x3131, 0x318e},
+  {0x31a0, 0x31b7},
+  {0x31f0, 0x31ff},
+  {0x3400, 0x4db5},
+  {0x4e00, 0x9fc3},
+  {0xa000, 0xa48c},
+  {0xa500, 0xa60c},
+  {0xa610, 0xa61f},
+  {0xa62a, 0xa62b},
+  {0xa640, 0xa65f},
+  {0xa662, 0xa66e},
+  {0xa67f, 0xa697},
+  {0xa717, 0xa71f},
+  {0xa722, 0xa788},
+  {0xa78b, 0xa78c},
+  {0xa7fb, 0xa801},
+  {0xa803, 0xa805},
+  {0xa807, 0xa80a},
+  {0xa80c, 0xa822},
+  {0xa840, 0xa873},
+  {0xa882, 0xa8b3},
+  {0xa90a, 0xa925},
+  {0xa930, 0xa946},
+  {0xaa00, 0xaa28},
+  {0xaa40, 0xaa42},
+  {0xaa44, 0xaa4b},
+  {0xac00, 0xd7a3},
+  {0xf900, 0xfa2d},
+  {0xfa30, 0xfa6a},
+  {0xfa70, 0xfad9},
+  {0xfb00, 0xfb06},
+  {0xfb13, 0xfb17},
+  {0xfb1d, 0xfb1d},
+  {0xfb1f, 0xfb28},
+  {0xfb2a, 0xfb36},
+  {0xfb38, 0xfb3c},
+  {0xfb3e, 0xfb3e},
+  {0xfb40, 0xfb41},
+  {0xfb43, 0xfb44},
+  {0xfb46, 0xfbb1},
+  {0xfbd3, 0xfd3d},
+  {0xfd50, 0xfd8f},
+  {0xfd92, 0xfdc7},
+  {0xfdf0, 0xfdfb},
+  {0xfe70, 0xfe74},
+  {0xfe76, 0xfefc},
+  {0xff21, 0xff3a},
+  {0xff41, 0xff5a},
+  {0xff66, 0xffbe},
+  {0xffc2, 0xffc7},
+  {0xffca, 0xffcf},
+  {0xffd2, 0xffd7},
+  {0xffda, 0xffdc},
+  {0x10000, 0x1000b},
+  {0x1000d, 0x10026},
+  {0x10028, 0x1003a},
+  {0x1003c, 0x1003d},
+  {0x1003f, 0x1004d},
+  {0x10050, 0x1005d},
+  {0x10080, 0x100fa},
+  {0x10280, 0x1029c},
+  {0x102a0, 0x102d0},
+  {0x10300, 0x1031e},
+  {0x10330, 0x10340},
+  {0x10342, 0x10349},
+  {0x10380, 0x1039d},
+  {0x103a0, 0x103c3},
+  {0x103c8, 0x103cf},
+  {0x10400, 0x1049d},
+  {0x10800, 0x10805},
+  {0x10808, 0x10808},
+  {0x1080a, 0x10835},
+  {0x10837, 0x10838},
+  {0x1083c, 0x1083c},
+  {0x1083f, 0x1083f},
+  {0x10900, 0x10915},
+  {0x10920, 0x10939},
+  {0x10a00, 0x10a00},
+  {0x10a10, 0x10a13},
+  {0x10a15, 0x10a17},
+  {0x10a19, 0x10a33},
+  {0x12000, 0x1236e},
+  {0x1d400, 0x1d454},
+  {0x1d456, 0x1d49c},
+  {0x1d49e, 0x1d49f},
+  {0x1d4a2, 0x1d4a2},
+  {0x1d4a5, 0x1d4a6},
+  {0x1d4a9, 0x1d4ac},
+  {0x1d4ae, 0x1d4b9},
+  {0x1d4bb, 0x1d4bb},
+  {0x1d4bd, 0x1d4c3},
+  {0x1d4c5, 0x1d505},
+  {0x1d507, 0x1d50a},
+  {0x1d50d, 0x1d514},
+  {0x1d516, 0x1d51c},
+  {0x1d51e, 0x1d539},
+  {0x1d53b, 0x1d53e},
+  {0x1d540, 0x1d544},
+  {0x1d546, 0x1d546},
+  {0x1d54a, 0x1d550},
+  {0x1d552, 0x1d6a5},
+  {0x1d6a8, 0x1d6c0},
+  {0x1d6c2, 0x1d6da},
+  {0x1d6dc, 0x1d6fa},
+  {0x1d6fc, 0x1d714},
+  {0x1d716, 0x1d734},
+  {0x1d736, 0x1d74e},
+  {0x1d750, 0x1d76e},
+  {0x1d770, 0x1d788},
+  {0x1d78a, 0x1d7a8},
+  {0x1d7aa, 0x1d7c2},
+  {0x1d7c4, 0x1d7cb},
+  {0x20000, 0x2a6d6},
+  {0x2f800, 0x2fa1d},
+};
+
+scm_t_char_set cs_letter = {
+  390,
+  cs_letter_ranges
+};
+
+scm_t_char_range cs_digit_ranges[] = {
+  {0x0030, 0x0039},
+  {0x0660, 0x0669},
+  {0x06f0, 0x06f9},
+  {0x07c0, 0x07c9},
+  {0x0966, 0x096f},
+  {0x09e6, 0x09ef},
+  {0x0a66, 0x0a6f},
+  {0x0ae6, 0x0aef},
+  {0x0b66, 0x0b6f},
+  {0x0be6, 0x0bef},
+  {0x0c66, 0x0c6f},
+  {0x0ce6, 0x0cef},
+  {0x0d66, 0x0d6f},
+  {0x0e50, 0x0e59},
+  {0x0ed0, 0x0ed9},
+  {0x0f20, 0x0f29},
+  {0x1040, 0x1049},
+  {0x1090, 0x1099},
+  {0x17e0, 0x17e9},
+  {0x1810, 0x1819},
+  {0x1946, 0x194f},
+  {0x19d0, 0x19d9},
+  {0x1b50, 0x1b59},
+  {0x1bb0, 0x1bb9},
+  {0x1c40, 0x1c49},
+  {0x1c50, 0x1c59},
+  {0xa620, 0xa629},
+  {0xa8d0, 0xa8d9},
+  {0xa900, 0xa909},
+  {0xaa50, 0xaa59},
+  {0xff10, 0xff19},
+  {0x104a0, 0x104a9},
+  {0x1d7ce, 0x1d7ff},
+};
+
+scm_t_char_set cs_digit = {
+  33,
+  cs_digit_ranges
+};
+
+scm_t_char_range cs_hex_digit_ranges[] = {
+  {0x0030, 0x0039},
+  {0x0041, 0x0046},
+  {0x0061, 0x0066},
+};
+
+scm_t_char_set cs_hex_digit = {
+  3,
+  cs_hex_digit_ranges
+};
+
+scm_t_char_range cs_letter_plus_digit_ranges[] = {
+  {0x0030, 0x0039},
+  {0x0041, 0x005a},
+  {0x0061, 0x007a},
+  {0x00aa, 0x00aa},
+  {0x00b5, 0x00b5},
+  {0x00ba, 0x00ba},
+  {0x00c0, 0x00d6},
+  {0x00d8, 0x00f6},
+  {0x00f8, 0x02c1},
+  {0x02c6, 0x02d1},
+  {0x02e0, 0x02e4},
+  {0x02ec, 0x02ec},
+  {0x02ee, 0x02ee},
+  {0x0370, 0x0374},
+  {0x0376, 0x0377},
+  {0x037a, 0x037d},
+  {0x0386, 0x0386},
+  {0x0388, 0x038a},
+  {0x038c, 0x038c},
+  {0x038e, 0x03a1},
+  {0x03a3, 0x03f5},
+  {0x03f7, 0x0481},
+  {0x048a, 0x0523},
+  {0x0531, 0x0556},
+  {0x0559, 0x0559},
+  {0x0561, 0x0587},
+  {0x05d0, 0x05ea},
+  {0x05f0, 0x05f2},
+  {0x0621, 0x064a},
+  {0x0660, 0x0669},
+  {0x066e, 0x066f},
+  {0x0671, 0x06d3},
+  {0x06d5, 0x06d5},
+  {0x06e5, 0x06e6},
+  {0x06ee, 0x06fc},
+  {0x06ff, 0x06ff},
+  {0x0710, 0x0710},
+  {0x0712, 0x072f},
+  {0x074d, 0x07a5},
+  {0x07b1, 0x07b1},
+  {0x07c0, 0x07ea},
+  {0x07f4, 0x07f5},
+  {0x07fa, 0x07fa},
+  {0x0904, 0x0939},
+  {0x093d, 0x093d},
+  {0x0950, 0x0950},
+  {0x0958, 0x0961},
+  {0x0966, 0x096f},
+  {0x0971, 0x0972},
+  {0x097b, 0x097f},
+  {0x0985, 0x098c},
+  {0x098f, 0x0990},
+  {0x0993, 0x09a8},
+  {0x09aa, 0x09b0},
+  {0x09b2, 0x09b2},
+  {0x09b6, 0x09b9},
+  {0x09bd, 0x09bd},
+  {0x09ce, 0x09ce},
+  {0x09dc, 0x09dd},
+  {0x09df, 0x09e1},
+  {0x09e6, 0x09f1},
+  {0x0a05, 0x0a0a},
+  {0x0a0f, 0x0a10},
+  {0x0a13, 0x0a28},
+  {0x0a2a, 0x0a30},
+  {0x0a32, 0x0a33},
+  {0x0a35, 0x0a36},
+  {0x0a38, 0x0a39},
+  {0x0a59, 0x0a5c},
+  {0x0a5e, 0x0a5e},
+  {0x0a66, 0x0a6f},
+  {0x0a72, 0x0a74},
+  {0x0a85, 0x0a8d},
+  {0x0a8f, 0x0a91},
+  {0x0a93, 0x0aa8},
+  {0x0aaa, 0x0ab0},
+  {0x0ab2, 0x0ab3},
+  {0x0ab5, 0x0ab9},
+  {0x0abd, 0x0abd},
+  {0x0ad0, 0x0ad0},
+  {0x0ae0, 0x0ae1},
+  {0x0ae6, 0x0aef},
+  {0x0b05, 0x0b0c},
+  {0x0b0f, 0x0b10},
+  {0x0b13, 0x0b28},
+  {0x0b2a, 0x0b30},
+  {0x0b32, 0x0b33},
+  {0x0b35, 0x0b39},
+  {0x0b3d, 0x0b3d},
+  {0x0b5c, 0x0b5d},
+  {0x0b5f, 0x0b61},
+  {0x0b66, 0x0b6f},
+  {0x0b71, 0x0b71},
+  {0x0b83, 0x0b83},
+  {0x0b85, 0x0b8a},
+  {0x0b8e, 0x0b90},
+  {0x0b92, 0x0b95},
+  {0x0b99, 0x0b9a},
+  {0x0b9c, 0x0b9c},
+  {0x0b9e, 0x0b9f},
+  {0x0ba3, 0x0ba4},
+  {0x0ba8, 0x0baa},
+  {0x0bae, 0x0bb9},
+  {0x0bd0, 0x0bd0},
+  {0x0be6, 0x0bef},
+  {0x0c05, 0x0c0c},
+  {0x0c0e, 0x0c10},
+  {0x0c12, 0x0c28},
+  {0x0c2a, 0x0c33},
+  {0x0c35, 0x0c39},
+  {0x0c3d, 0x0c3d},
+  {0x0c58, 0x0c59},
+  {0x0c60, 0x0c61},
+  {0x0c66, 0x0c6f},
+  {0x0c85, 0x0c8c},
+  {0x0c8e, 0x0c90},
+  {0x0c92, 0x0ca8},
+  {0x0caa, 0x0cb3},
+  {0x0cb5, 0x0cb9},
+  {0x0cbd, 0x0cbd},
+  {0x0cde, 0x0cde},
+  {0x0ce0, 0x0ce1},
+  {0x0ce6, 0x0cef},
+  {0x0d05, 0x0d0c},
+  {0x0d0e, 0x0d10},
+  {0x0d12, 0x0d28},
+  {0x0d2a, 0x0d39},
+  {0x0d3d, 0x0d3d},
+  {0x0d60, 0x0d61},
+  {0x0d66, 0x0d6f},
+  {0x0d7a, 0x0d7f},
+  {0x0d85, 0x0d96},
+  {0x0d9a, 0x0db1},
+  {0x0db3, 0x0dbb},
+  {0x0dbd, 0x0dbd},
+  {0x0dc0, 0x0dc6},
+  {0x0e01, 0x0e30},
+  {0x0e32, 0x0e33},
+  {0x0e40, 0x0e46},
+  {0x0e50, 0x0e59},
+  {0x0e81, 0x0e82},
+  {0x0e84, 0x0e84},
+  {0x0e87, 0x0e88},
+  {0x0e8a, 0x0e8a},
+  {0x0e8d, 0x0e8d},
+  {0x0e94, 0x0e97},
+  {0x0e99, 0x0e9f},
+  {0x0ea1, 0x0ea3},
+  {0x0ea5, 0x0ea5},
+  {0x0ea7, 0x0ea7},
+  {0x0eaa, 0x0eab},
+  {0x0ead, 0x0eb0},
+  {0x0eb2, 0x0eb3},
+  {0x0ebd, 0x0ebd},
+  {0x0ec0, 0x0ec4},
+  {0x0ec6, 0x0ec6},
+  {0x0ed0, 0x0ed9},
+  {0x0edc, 0x0edd},
+  {0x0f00, 0x0f00},
+  {0x0f20, 0x0f29},
+  {0x0f40, 0x0f47},
+  {0x0f49, 0x0f6c},
+  {0x0f88, 0x0f8b},
+  {0x1000, 0x102a},
+  {0x103f, 0x1049},
+  {0x1050, 0x1055},
+  {0x105a, 0x105d},
+  {0x1061, 0x1061},
+  {0x1065, 0x1066},
+  {0x106e, 0x1070},
+  {0x1075, 0x1081},
+  {0x108e, 0x108e},
+  {0x1090, 0x1099},
+  {0x10a0, 0x10c5},
+  {0x10d0, 0x10fa},
+  {0x10fc, 0x10fc},
+  {0x1100, 0x1159},
+  {0x115f, 0x11a2},
+  {0x11a8, 0x11f9},
+  {0x1200, 0x1248},
+  {0x124a, 0x124d},
+  {0x1250, 0x1256},
+  {0x1258, 0x1258},
+  {0x125a, 0x125d},
+  {0x1260, 0x1288},
+  {0x128a, 0x128d},
+  {0x1290, 0x12b0},
+  {0x12b2, 0x12b5},
+  {0x12b8, 0x12be},
+  {0x12c0, 0x12c0},
+  {0x12c2, 0x12c5},
+  {0x12c8, 0x12d6},
+  {0x12d8, 0x1310},
+  {0x1312, 0x1315},
+  {0x1318, 0x135a},
+  {0x1380, 0x138f},
+  {0x13a0, 0x13f4},
+  {0x1401, 0x166c},
+  {0x166f, 0x1676},
+  {0x1681, 0x169a},
+  {0x16a0, 0x16ea},
+  {0x1700, 0x170c},
+  {0x170e, 0x1711},
+  {0x1720, 0x1731},
+  {0x1740, 0x1751},
+  {0x1760, 0x176c},
+  {0x176e, 0x1770},
+  {0x1780, 0x17b3},
+  {0x17d7, 0x17d7},
+  {0x17dc, 0x17dc},
+  {0x17e0, 0x17e9},
+  {0x1810, 0x1819},
+  {0x1820, 0x1877},
+  {0x1880, 0x18a8},
+  {0x18aa, 0x18aa},
+  {0x1900, 0x191c},
+  {0x1946, 0x196d},
+  {0x1970, 0x1974},
+  {0x1980, 0x19a9},
+  {0x19c1, 0x19c7},
+  {0x19d0, 0x19d9},
+  {0x1a00, 0x1a16},
+  {0x1b05, 0x1b33},
+  {0x1b45, 0x1b4b},
+  {0x1b50, 0x1b59},
+  {0x1b83, 0x1ba0},
+  {0x1bae, 0x1bb9},
+  {0x1c00, 0x1c23},
+  {0x1c40, 0x1c49},
+  {0x1c4d, 0x1c7d},
+  {0x1d00, 0x1dbf},
+  {0x1e00, 0x1f15},
+  {0x1f18, 0x1f1d},
+  {0x1f20, 0x1f45},
+  {0x1f48, 0x1f4d},
+  {0x1f50, 0x1f57},
+  {0x1f59, 0x1f59},
+  {0x1f5b, 0x1f5b},
+  {0x1f5d, 0x1f5d},
+  {0x1f5f, 0x1f7d},
+  {0x1f80, 0x1fb4},
+  {0x1fb6, 0x1fbc},
+  {0x1fbe, 0x1fbe},
+  {0x1fc2, 0x1fc4},
+  {0x1fc6, 0x1fcc},
+  {0x1fd0, 0x1fd3},
+  {0x1fd6, 0x1fdb},
+  {0x1fe0, 0x1fec},
+  {0x1ff2, 0x1ff4},
+  {0x1ff6, 0x1ffc},
+  {0x2071, 0x2071},
+  {0x207f, 0x207f},
+  {0x2090, 0x2094},
+  {0x2102, 0x2102},
+  {0x2107, 0x2107},
+  {0x210a, 0x2113},
+  {0x2115, 0x2115},
+  {0x2119, 0x211d},
+  {0x2124, 0x2124},
+  {0x2126, 0x2126},
+  {0x2128, 0x2128},
+  {0x212a, 0x212d},
+  {0x212f, 0x2139},
+  {0x213c, 0x213f},
+  {0x2145, 0x2149},
+  {0x214e, 0x214e},
+  {0x2183, 0x2184},
+  {0x2c00, 0x2c2e},
+  {0x2c30, 0x2c5e},
+  {0x2c60, 0x2c6f},
+  {0x2c71, 0x2c7d},
+  {0x2c80, 0x2ce4},
+  {0x2d00, 0x2d25},
+  {0x2d30, 0x2d65},
+  {0x2d6f, 0x2d6f},
+  {0x2d80, 0x2d96},
+  {0x2da0, 0x2da6},
+  {0x2da8, 0x2dae},
+  {0x2db0, 0x2db6},
+  {0x2db8, 0x2dbe},
+  {0x2dc0, 0x2dc6},
+  {0x2dc8, 0x2dce},
+  {0x2dd0, 0x2dd6},
+  {0x2dd8, 0x2dde},
+  {0x2e2f, 0x2e2f},
+  {0x3005, 0x3006},
+  {0x3031, 0x3035},
+  {0x303b, 0x303c},
+  {0x3041, 0x3096},
+  {0x309d, 0x309f},
+  {0x30a1, 0x30fa},
+  {0x30fc, 0x30ff},
+  {0x3105, 0x312d},
+  {0x3131, 0x318e},
+  {0x31a0, 0x31b7},
+  {0x31f0, 0x31ff},
+  {0x3400, 0x4db5},
+  {0x4e00, 0x9fc3},
+  {0xa000, 0xa48c},
+  {0xa500, 0xa60c},
+  {0xa610, 0xa62b},
+  {0xa640, 0xa65f},
+  {0xa662, 0xa66e},
+  {0xa67f, 0xa697},
+  {0xa717, 0xa71f},
+  {0xa722, 0xa788},
+  {0xa78b, 0xa78c},
+  {0xa7fb, 0xa801},
+  {0xa803, 0xa805},
+  {0xa807, 0xa80a},
+  {0xa80c, 0xa822},
+  {0xa840, 0xa873},
+  {0xa882, 0xa8b3},
+  {0xa8d0, 0xa8d9},
+  {0xa900, 0xa925},
+  {0xa930, 0xa946},
+  {0xaa00, 0xaa28},
+  {0xaa40, 0xaa42},
+  {0xaa44, 0xaa4b},
+  {0xaa50, 0xaa59},
+  {0xac00, 0xd7a3},
+  {0xf900, 0xfa2d},
+  {0xfa30, 0xfa6a},
+  {0xfa70, 0xfad9},
+  {0xfb00, 0xfb06},
+  {0xfb13, 0xfb17},
+  {0xfb1d, 0xfb1d},
+  {0xfb1f, 0xfb28},
+  {0xfb2a, 0xfb36},
+  {0xfb38, 0xfb3c},
+  {0xfb3e, 0xfb3e},
+  {0xfb40, 0xfb41},
+  {0xfb43, 0xfb44},
+  {0xfb46, 0xfbb1},
+  {0xfbd3, 0xfd3d},
+  {0xfd50, 0xfd8f},
+  {0xfd92, 0xfdc7},
+  {0xfdf0, 0xfdfb},
+  {0xfe70, 0xfe74},
+  {0xfe76, 0xfefc},
+  {0xff10, 0xff19},
+  {0xff21, 0xff3a},
+  {0xff41, 0xff5a},
+  {0xff66, 0xffbe},
+  {0xffc2, 0xffc7},
+  {0xffca, 0xffcf},
+  {0xffd2, 0xffd7},
+  {0xffda, 0xffdc},
+  {0x10000, 0x1000b},
+  {0x1000d, 0x10026},
+  {0x10028, 0x1003a},
+  {0x1003c, 0x1003d},
+  {0x1003f, 0x1004d},
+  {0x10050, 0x1005d},
+  {0x10080, 0x100fa},
+  {0x10280, 0x1029c},
+  {0x102a0, 0x102d0},
+  {0x10300, 0x1031e},
+  {0x10330, 0x10340},
+  {0x10342, 0x10349},
+  {0x10380, 0x1039d},
+  {0x103a0, 0x103c3},
+  {0x103c8, 0x103cf},
+  {0x10400, 0x1049d},
+  {0x104a0, 0x104a9},
+  {0x10800, 0x10805},
+  {0x10808, 0x10808},
+  {0x1080a, 0x10835},
+  {0x10837, 0x10838},
+  {0x1083c, 0x1083c},
+  {0x1083f, 0x1083f},
+  {0x10900, 0x10915},
+  {0x10920, 0x10939},
+  {0x10a00, 0x10a00},
+  {0x10a10, 0x10a13},
+  {0x10a15, 0x10a17},
+  {0x10a19, 0x10a33},
+  {0x12000, 0x1236e},
+  {0x1d400, 0x1d454},
+  {0x1d456, 0x1d49c},
+  {0x1d49e, 0x1d49f},
+  {0x1d4a2, 0x1d4a2},
+  {0x1d4a5, 0x1d4a6},
+  {0x1d4a9, 0x1d4ac},
+  {0x1d4ae, 0x1d4b9},
+  {0x1d4bb, 0x1d4bb},
+  {0x1d4bd, 0x1d4c3},
+  {0x1d4c5, 0x1d505},
+  {0x1d507, 0x1d50a},
+  {0x1d50d, 0x1d514},
+  {0x1d516, 0x1d51c},
+  {0x1d51e, 0x1d539},
+  {0x1d53b, 0x1d53e},
+  {0x1d540, 0x1d544},
+  {0x1d546, 0x1d546},
+  {0x1d54a, 0x1d550},
+  {0x1d552, 0x1d6a5},
+  {0x1d6a8, 0x1d6c0},
+  {0x1d6c2, 0x1d6da},
+  {0x1d6dc, 0x1d6fa},
+  {0x1d6fc, 0x1d714},
+  {0x1d716, 0x1d734},
+  {0x1d736, 0x1d74e},
+  {0x1d750, 0x1d76e},
+  {0x1d770, 0x1d788},
+  {0x1d78a, 0x1d7a8},
+  {0x1d7aa, 0x1d7c2},
+  {0x1d7c4, 0x1d7cb},
+  {0x1d7ce, 0x1d7ff},
+  {0x20000, 0x2a6d6},
+  {0x2f800, 0x2fa1d},
+};
+
+scm_t_char_set cs_letter_plus_digit = {
+  411,
+  cs_letter_plus_digit_ranges
+};
+
+scm_t_char_range cs_graphic_ranges[] = {
+  {0x0021, 0x007e},
+  {0x00a1, 0x00ac},
+  {0x00ae, 0x0377},
+  {0x037a, 0x037e},
+  {0x0384, 0x038a},
+  {0x038c, 0x038c},
+  {0x038e, 0x03a1},
+  {0x03a3, 0x0523},
+  {0x0531, 0x0556},
+  {0x0559, 0x055f},
+  {0x0561, 0x0587},
+  {0x0589, 0x058a},
+  {0x0591, 0x05c7},
+  {0x05d0, 0x05ea},
+  {0x05f0, 0x05f4},
+  {0x0606, 0x061b},
+  {0x061e, 0x061f},
+  {0x0621, 0x065e},
+  {0x0660, 0x06dc},
+  {0x06de, 0x070d},
+  {0x0710, 0x074a},
+  {0x074d, 0x07b1},
+  {0x07c0, 0x07fa},
+  {0x0901, 0x0939},
+  {0x093c, 0x094d},
+  {0x0950, 0x0954},
+  {0x0958, 0x0972},
+  {0x097b, 0x097f},
+  {0x0981, 0x0983},
+  {0x0985, 0x098c},
+  {0x098f, 0x0990},
+  {0x0993, 0x09a8},
+  {0x09aa, 0x09b0},
+  {0x09b2, 0x09b2},
+  {0x09b6, 0x09b9},
+  {0x09bc, 0x09c4},
+  {0x09c7, 0x09c8},
+  {0x09cb, 0x09ce},
+  {0x09d7, 0x09d7},
+  {0x09dc, 0x09dd},
+  {0x09df, 0x09e3},
+  {0x09e6, 0x09fa},
+  {0x0a01, 0x0a03},
+  {0x0a05, 0x0a0a},
+  {0x0a0f, 0x0a10},
+  {0x0a13, 0x0a28},
+  {0x0a2a, 0x0a30},
+  {0x0a32, 0x0a33},
+  {0x0a35, 0x0a36},
+  {0x0a38, 0x0a39},
+  {0x0a3c, 0x0a3c},
+  {0x0a3e, 0x0a42},
+  {0x0a47, 0x0a48},
+  {0x0a4b, 0x0a4d},
+  {0x0a51, 0x0a51},
+  {0x0a59, 0x0a5c},
+  {0x0a5e, 0x0a5e},
+  {0x0a66, 0x0a75},
+  {0x0a81, 0x0a83},
+  {0x0a85, 0x0a8d},
+  {0x0a8f, 0x0a91},
+  {0x0a93, 0x0aa8},
+  {0x0aaa, 0x0ab0},
+  {0x0ab2, 0x0ab3},
+  {0x0ab5, 0x0ab9},
+  {0x0abc, 0x0ac5},
+  {0x0ac7, 0x0ac9},
+  {0x0acb, 0x0acd},
+  {0x0ad0, 0x0ad0},
+  {0x0ae0, 0x0ae3},
+  {0x0ae6, 0x0aef},
+  {0x0af1, 0x0af1},
+  {0x0b01, 0x0b03},
+  {0x0b05, 0x0b0c},
+  {0x0b0f, 0x0b10},
+  {0x0b13, 0x0b28},
+  {0x0b2a, 0x0b30},
+  {0x0b32, 0x0b33},
+  {0x0b35, 0x0b39},
+  {0x0b3c, 0x0b44},
+  {0x0b47, 0x0b48},
+  {0x0b4b, 0x0b4d},
+  {0x0b56, 0x0b57},
+  {0x0b5c, 0x0b5d},
+  {0x0b5f, 0x0b63},
+  {0x0b66, 0x0b71},
+  {0x0b82, 0x0b83},
+  {0x0b85, 0x0b8a},
+  {0x0b8e, 0x0b90},
+  {0x0b92, 0x0b95},
+  {0x0b99, 0x0b9a},
+  {0x0b9c, 0x0b9c},
+  {0x0b9e, 0x0b9f},
+  {0x0ba3, 0x0ba4},
+  {0x0ba8, 0x0baa},
+  {0x0bae, 0x0bb9},
+  {0x0bbe, 0x0bc2},
+  {0x0bc6, 0x0bc8},
+  {0x0bca, 0x0bcd},
+  {0x0bd0, 0x0bd0},
+  {0x0bd7, 0x0bd7},
+  {0x0be6, 0x0bfa},
+  {0x0c01, 0x0c03},
+  {0x0c05, 0x0c0c},
+  {0x0c0e, 0x0c10},
+  {0x0c12, 0x0c28},
+  {0x0c2a, 0x0c33},
+  {0x0c35, 0x0c39},
+  {0x0c3d, 0x0c44},
+  {0x0c46, 0x0c48},
+  {0x0c4a, 0x0c4d},
+  {0x0c55, 0x0c56},
+  {0x0c58, 0x0c59},
+  {0x0c60, 0x0c63},
+  {0x0c66, 0x0c6f},
+  {0x0c78, 0x0c7f},
+  {0x0c82, 0x0c83},
+  {0x0c85, 0x0c8c},
+  {0x0c8e, 0x0c90},
+  {0x0c92, 0x0ca8},
+  {0x0caa, 0x0cb3},
+  {0x0cb5, 0x0cb9},
+  {0x0cbc, 0x0cc4},
+  {0x0cc6, 0x0cc8},
+  {0x0cca, 0x0ccd},
+  {0x0cd5, 0x0cd6},
+  {0x0cde, 0x0cde},
+  {0x0ce0, 0x0ce3},
+  {0x0ce6, 0x0cef},
+  {0x0cf1, 0x0cf2},
+  {0x0d02, 0x0d03},
+  {0x0d05, 0x0d0c},
+  {0x0d0e, 0x0d10},
+  {0x0d12, 0x0d28},
+  {0x0d2a, 0x0d39},
+  {0x0d3d, 0x0d44},
+  {0x0d46, 0x0d48},
+  {0x0d4a, 0x0d4d},
+  {0x0d57, 0x0d57},
+  {0x0d60, 0x0d63},
+  {0x0d66, 0x0d75},
+  {0x0d79, 0x0d7f},
+  {0x0d82, 0x0d83},
+  {0x0d85, 0x0d96},
+  {0x0d9a, 0x0db1},
+  {0x0db3, 0x0dbb},
+  {0x0dbd, 0x0dbd},
+  {0x0dc0, 0x0dc6},
+  {0x0dca, 0x0dca},
+  {0x0dcf, 0x0dd4},
+  {0x0dd6, 0x0dd6},
+  {0x0dd8, 0x0ddf},
+  {0x0df2, 0x0df4},
+  {0x0e01, 0x0e3a},
+  {0x0e3f, 0x0e5b},
+  {0x0e81, 0x0e82},
+  {0x0e84, 0x0e84},
+  {0x0e87, 0x0e88},
+  {0x0e8a, 0x0e8a},
+  {0x0e8d, 0x0e8d},
+  {0x0e94, 0x0e97},
+  {0x0e99, 0x0e9f},
+  {0x0ea1, 0x0ea3},
+  {0x0ea5, 0x0ea5},
+  {0x0ea7, 0x0ea7},
+  {0x0eaa, 0x0eab},
+  {0x0ead, 0x0eb9},
+  {0x0ebb, 0x0ebd},
+  {0x0ec0, 0x0ec4},
+  {0x0ec6, 0x0ec6},
+  {0x0ec8, 0x0ecd},
+  {0x0ed0, 0x0ed9},
+  {0x0edc, 0x0edd},
+  {0x0f00, 0x0f47},
+  {0x0f49, 0x0f6c},
+  {0x0f71, 0x0f8b},
+  {0x0f90, 0x0f97},
+  {0x0f99, 0x0fbc},
+  {0x0fbe, 0x0fcc},
+  {0x0fce, 0x0fd4},
+  {0x1000, 0x1099},
+  {0x109e, 0x10c5},
+  {0x10d0, 0x10fc},
+  {0x1100, 0x1159},
+  {0x115f, 0x11a2},
+  {0x11a8, 0x11f9},
+  {0x1200, 0x1248},
+  {0x124a, 0x124d},
+  {0x1250, 0x1256},
+  {0x1258, 0x1258},
+  {0x125a, 0x125d},
+  {0x1260, 0x1288},
+  {0x128a, 0x128d},
+  {0x1290, 0x12b0},
+  {0x12b2, 0x12b5},
+  {0x12b8, 0x12be},
+  {0x12c0, 0x12c0},
+  {0x12c2, 0x12c5},
+  {0x12c8, 0x12d6},
+  {0x12d8, 0x1310},
+  {0x1312, 0x1315},
+  {0x1318, 0x135a},
+  {0x135f, 0x137c},
+  {0x1380, 0x1399},
+  {0x13a0, 0x13f4},
+  {0x1401, 0x1676},
+  {0x1681, 0x169c},
+  {0x16a0, 0x16f0},
+  {0x1700, 0x170c},
+  {0x170e, 0x1714},
+  {0x1720, 0x1736},
+  {0x1740, 0x1753},
+  {0x1760, 0x176c},
+  {0x176e, 0x1770},
+  {0x1772, 0x1773},
+  {0x1780, 0x17b3},
+  {0x17b6, 0x17dd},
+  {0x17e0, 0x17e9},
+  {0x17f0, 0x17f9},
+  {0x1800, 0x180d},
+  {0x1810, 0x1819},
+  {0x1820, 0x1877},
+  {0x1880, 0x18aa},
+  {0x1900, 0x191c},
+  {0x1920, 0x192b},
+  {0x1930, 0x193b},
+  {0x1940, 0x1940},
+  {0x1944, 0x196d},
+  {0x1970, 0x1974},
+  {0x1980, 0x19a9},
+  {0x19b0, 0x19c9},
+  {0x19d0, 0x19d9},
+  {0x19de, 0x1a1b},
+  {0x1a1e, 0x1a1f},
+  {0x1b00, 0x1b4b},
+  {0x1b50, 0x1b7c},
+  {0x1b80, 0x1baa},
+  {0x1bae, 0x1bb9},
+  {0x1c00, 0x1c37},
+  {0x1c3b, 0x1c49},
+  {0x1c4d, 0x1c7f},
+  {0x1d00, 0x1de6},
+  {0x1dfe, 0x1f15},
+  {0x1f18, 0x1f1d},
+  {0x1f20, 0x1f45},
+  {0x1f48, 0x1f4d},
+  {0x1f50, 0x1f57},
+  {0x1f59, 0x1f59},
+  {0x1f5b, 0x1f5b},
+  {0x1f5d, 0x1f5d},
+  {0x1f5f, 0x1f7d},
+  {0x1f80, 0x1fb4},
+  {0x1fb6, 0x1fc4},
+  {0x1fc6, 0x1fd3},
+  {0x1fd6, 0x1fdb},
+  {0x1fdd, 0x1fef},
+  {0x1ff2, 0x1ff4},
+  {0x1ff6, 0x1ffe},
+  {0x2010, 0x2027},
+  {0x2030, 0x205e},
+  {0x2070, 0x2071},
+  {0x2074, 0x208e},
+  {0x2090, 0x2094},
+  {0x20a0, 0x20b5},
+  {0x20d0, 0x20f0},
+  {0x2100, 0x214f},
+  {0x2153, 0x2188},
+  {0x2190, 0x23e7},
+  {0x2400, 0x2426},
+  {0x2440, 0x244a},
+  {0x2460, 0x269d},
+  {0x26a0, 0x26bc},
+  {0x26c0, 0x26c3},
+  {0x2701, 0x2704},
+  {0x2706, 0x2709},
+  {0x270c, 0x2727},
+  {0x2729, 0x274b},
+  {0x274d, 0x274d},
+  {0x274f, 0x2752},
+  {0x2756, 0x2756},
+  {0x2758, 0x275e},
+  {0x2761, 0x2794},
+  {0x2798, 0x27af},
+  {0x27b1, 0x27be},
+  {0x27c0, 0x27ca},
+  {0x27cc, 0x27cc},
+  {0x27d0, 0x2b4c},
+  {0x2b50, 0x2b54},
+  {0x2c00, 0x2c2e},
+  {0x2c30, 0x2c5e},
+  {0x2c60, 0x2c6f},
+  {0x2c71, 0x2c7d},
+  {0x2c80, 0x2cea},
+  {0x2cf9, 0x2d25},
+  {0x2d30, 0x2d65},
+  {0x2d6f, 0x2d6f},
+  {0x2d80, 0x2d96},
+  {0x2da0, 0x2da6},
+  {0x2da8, 0x2dae},
+  {0x2db0, 0x2db6},
+  {0x2db8, 0x2dbe},
+  {0x2dc0, 0x2dc6},
+  {0x2dc8, 0x2dce},
+  {0x2dd0, 0x2dd6},
+  {0x2dd8, 0x2dde},
+  {0x2de0, 0x2e30},
+  {0x2e80, 0x2e99},
+  {0x2e9b, 0x2ef3},
+  {0x2f00, 0x2fd5},
+  {0x2ff0, 0x2ffb},
+  {0x3001, 0x303f},
+  {0x3041, 0x3096},
+  {0x3099, 0x30ff},
+  {0x3105, 0x312d},
+  {0x3131, 0x318e},
+  {0x3190, 0x31b7},
+  {0x31c0, 0x31e3},
+  {0x31f0, 0x321e},
+  {0x3220, 0x3243},
+  {0x3250, 0x32fe},
+  {0x3300, 0x4db5},
+  {0x4dc0, 0x9fc3},
+  {0xa000, 0xa48c},
+  {0xa490, 0xa4c6},
+  {0xa500, 0xa62b},
+  {0xa640, 0xa65f},
+  {0xa662, 0xa673},
+  {0xa67c, 0xa697},
+  {0xa700, 0xa78c},
+  {0xa7fb, 0xa82b},
+  {0xa840, 0xa877},
+  {0xa880, 0xa8c4},
+  {0xa8ce, 0xa8d9},
+  {0xa900, 0xa953},
+  {0xa95f, 0xa95f},
+  {0xaa00, 0xaa36},
+  {0xaa40, 0xaa4d},
+  {0xaa50, 0xaa59},
+  {0xaa5c, 0xaa5f},
+  {0xac00, 0xd7a3},
+  {0xf900, 0xfa2d},
+  {0xfa30, 0xfa6a},
+  {0xfa70, 0xfad9},
+  {0xfb00, 0xfb06},
+  {0xfb13, 0xfb17},
+  {0xfb1d, 0xfb36},
+  {0xfb38, 0xfb3c},
+  {0xfb3e, 0xfb3e},
+  {0xfb40, 0xfb41},
+  {0xfb43, 0xfb44},
+  {0xfb46, 0xfbb1},
+  {0xfbd3, 0xfd3f},
+  {0xfd50, 0xfd8f},
+  {0xfd92, 0xfdc7},
+  {0xfdf0, 0xfdfd},
+  {0xfe00, 0xfe19},
+  {0xfe20, 0xfe26},
+  {0xfe30, 0xfe52},
+  {0xfe54, 0xfe66},
+  {0xfe68, 0xfe6b},
+  {0xfe70, 0xfe74},
+  {0xfe76, 0xfefc},
+  {0xff01, 0xffbe},
+  {0xffc2, 0xffc7},
+  {0xffca, 0xffcf},
+  {0xffd2, 0xffd7},
+  {0xffda, 0xffdc},
+  {0xffe0, 0xffe6},
+  {0xffe8, 0xffee},
+  {0xfffc, 0xfffd},
+  {0x10000, 0x1000b},
+  {0x1000d, 0x10026},
+  {0x10028, 0x1003a},
+  {0x1003c, 0x1003d},
+  {0x1003f, 0x1004d},
+  {0x10050, 0x1005d},
+  {0x10080, 0x100fa},
+  {0x10100, 0x10102},
+  {0x10107, 0x10133},
+  {0x10137, 0x1018a},
+  {0x10190, 0x1019b},
+  {0x101d0, 0x101fd},
+  {0x10280, 0x1029c},
+  {0x102a0, 0x102d0},
+  {0x10300, 0x1031e},
+  {0x10320, 0x10323},
+  {0x10330, 0x1034a},
+  {0x10380, 0x1039d},
+  {0x1039f, 0x103c3},
+  {0x103c8, 0x103d5},
+  {0x10400, 0x1049d},
+  {0x104a0, 0x104a9},
+  {0x10800, 0x10805},
+  {0x10808, 0x10808},
+  {0x1080a, 0x10835},
+  {0x10837, 0x10838},
+  {0x1083c, 0x1083c},
+  {0x1083f, 0x1083f},
+  {0x10900, 0x10919},
+  {0x1091f, 0x10939},
+  {0x1093f, 0x1093f},
+  {0x10a00, 0x10a03},
+  {0x10a05, 0x10a06},
+  {0x10a0c, 0x10a13},
+  {0x10a15, 0x10a17},
+  {0x10a19, 0x10a33},
+  {0x10a38, 0x10a3a},
+  {0x10a3f, 0x10a47},
+  {0x10a50, 0x10a58},
+  {0x12000, 0x1236e},
+  {0x12400, 0x12462},
+  {0x12470, 0x12473},
+  {0x1d000, 0x1d0f5},
+  {0x1d100, 0x1d126},
+  {0x1d129, 0x1d172},
+  {0x1d17b, 0x1d1dd},
+  {0x1d200, 0x1d245},
+  {0x1d300, 0x1d356},
+  {0x1d360, 0x1d371},
+  {0x1d400, 0x1d454},
+  {0x1d456, 0x1d49c},
+  {0x1d49e, 0x1d49f},
+  {0x1d4a2, 0x1d4a2},
+  {0x1d4a5, 0x1d4a6},
+  {0x1d4a9, 0x1d4ac},
+  {0x1d4ae, 0x1d4b9},
+  {0x1d4bb, 0x1d4bb},
+  {0x1d4bd, 0x1d4c3},
+  {0x1d4c5, 0x1d505},
+  {0x1d507, 0x1d50a},
+  {0x1d50d, 0x1d514},
+  {0x1d516, 0x1d51c},
+  {0x1d51e, 0x1d539},
+  {0x1d53b, 0x1d53e},
+  {0x1d540, 0x1d544},
+  {0x1d546, 0x1d546},
+  {0x1d54a, 0x1d550},
+  {0x1d552, 0x1d6a5},
+  {0x1d6a8, 0x1d7cb},
+  {0x1d7ce, 0x1d7ff},
+  {0x1f000, 0x1f02b},
+  {0x1f030, 0x1f093},
+  {0x20000, 0x2a6d6},
+  {0x2f800, 0x2fa1d},
+  {0xe0100, 0xe01ef},
+};
+
+scm_t_char_set cs_graphic = {
+  445,
+  cs_graphic_ranges
+};
+
+scm_t_char_range cs_whitespace_ranges[] = {
+  {0x0009, 0x000d},
+  {0x0020, 0x0020},
+  {0x00a0, 0x00a0},
+  {0x1680, 0x1680},
+  {0x180e, 0x180e},
+  {0x2000, 0x200a},
+  {0x2028, 0x2029},
+  {0x202f, 0x202f},
+  {0x205f, 0x205f},
+  {0x3000, 0x3000},
+};
+
+scm_t_char_set cs_whitespace = {
+  10,
+  cs_whitespace_ranges
+};
+
+scm_t_char_range cs_printing_ranges[] = {
+  {0x0009, 0x000d},
+  {0x0020, 0x007e},
+  {0x00a0, 0x00ac},
+  {0x00ae, 0x0377},
+  {0x037a, 0x037e},
+  {0x0384, 0x038a},
+  {0x038c, 0x038c},
+  {0x038e, 0x03a1},
+  {0x03a3, 0x0523},
+  {0x0531, 0x0556},
+  {0x0559, 0x055f},
+  {0x0561, 0x0587},
+  {0x0589, 0x058a},
+  {0x0591, 0x05c7},
+  {0x05d0, 0x05ea},
+  {0x05f0, 0x05f4},
+  {0x0606, 0x061b},
+  {0x061e, 0x061f},
+  {0x0621, 0x065e},
+  {0x0660, 0x06dc},
+  {0x06de, 0x070d},
+  {0x0710, 0x074a},
+  {0x074d, 0x07b1},
+  {0x07c0, 0x07fa},
+  {0x0901, 0x0939},
+  {0x093c, 0x094d},
+  {0x0950, 0x0954},
+  {0x0958, 0x0972},
+  {0x097b, 0x097f},
+  {0x0981, 0x0983},
+  {0x0985, 0x098c},
+  {0x098f, 0x0990},
+  {0x0993, 0x09a8},
+  {0x09aa, 0x09b0},
+  {0x09b2, 0x09b2},
+  {0x09b6, 0x09b9},
+  {0x09bc, 0x09c4},
+  {0x09c7, 0x09c8},
+  {0x09cb, 0x09ce},
+  {0x09d7, 0x09d7},
+  {0x09dc, 0x09dd},
+  {0x09df, 0x09e3},
+  {0x09e6, 0x09fa},
+  {0x0a01, 0x0a03},
+  {0x0a05, 0x0a0a},
+  {0x0a0f, 0x0a10},
+  {0x0a13, 0x0a28},
+  {0x0a2a, 0x0a30},
+  {0x0a32, 0x0a33},
+  {0x0a35, 0x0a36},
+  {0x0a38, 0x0a39},
+  {0x0a3c, 0x0a3c},
+  {0x0a3e, 0x0a42},
+  {0x0a47, 0x0a48},
+  {0x0a4b, 0x0a4d},
+  {0x0a51, 0x0a51},
+  {0x0a59, 0x0a5c},
+  {0x0a5e, 0x0a5e},
+  {0x0a66, 0x0a75},
+  {0x0a81, 0x0a83},
+  {0x0a85, 0x0a8d},
+  {0x0a8f, 0x0a91},
+  {0x0a93, 0x0aa8},
+  {0x0aaa, 0x0ab0},
+  {0x0ab2, 0x0ab3},
+  {0x0ab5, 0x0ab9},
+  {0x0abc, 0x0ac5},
+  {0x0ac7, 0x0ac9},
+  {0x0acb, 0x0acd},
+  {0x0ad0, 0x0ad0},
+  {0x0ae0, 0x0ae3},
+  {0x0ae6, 0x0aef},
+  {0x0af1, 0x0af1},
+  {0x0b01, 0x0b03},
+  {0x0b05, 0x0b0c},
+  {0x0b0f, 0x0b10},
+  {0x0b13, 0x0b28},
+  {0x0b2a, 0x0b30},
+  {0x0b32, 0x0b33},
+  {0x0b35, 0x0b39},
+  {0x0b3c, 0x0b44},
+  {0x0b47, 0x0b48},
+  {0x0b4b, 0x0b4d},
+  {0x0b56, 0x0b57},
+  {0x0b5c, 0x0b5d},
+  {0x0b5f, 0x0b63},
+  {0x0b66, 0x0b71},
+  {0x0b82, 0x0b83},
+  {0x0b85, 0x0b8a},
+  {0x0b8e, 0x0b90},
+  {0x0b92, 0x0b95},
+  {0x0b99, 0x0b9a},
+  {0x0b9c, 0x0b9c},
+  {0x0b9e, 0x0b9f},
+  {0x0ba3, 0x0ba4},
+  {0x0ba8, 0x0baa},
+  {0x0bae, 0x0bb9},
+  {0x0bbe, 0x0bc2},
+  {0x0bc6, 0x0bc8},
+  {0x0bca, 0x0bcd},
+  {0x0bd0, 0x0bd0},
+  {0x0bd7, 0x0bd7},
+  {0x0be6, 0x0bfa},
+  {0x0c01, 0x0c03},
+  {0x0c05, 0x0c0c},
+  {0x0c0e, 0x0c10},
+  {0x0c12, 0x0c28},
+  {0x0c2a, 0x0c33},
+  {0x0c35, 0x0c39},
+  {0x0c3d, 0x0c44},
+  {0x0c46, 0x0c48},
+  {0x0c4a, 0x0c4d},
+  {0x0c55, 0x0c56},
+  {0x0c58, 0x0c59},
+  {0x0c60, 0x0c63},
+  {0x0c66, 0x0c6f},
+  {0x0c78, 0x0c7f},
+  {0x0c82, 0x0c83},
+  {0x0c85, 0x0c8c},
+  {0x0c8e, 0x0c90},
+  {0x0c92, 0x0ca8},
+  {0x0caa, 0x0cb3},
+  {0x0cb5, 0x0cb9},
+  {0x0cbc, 0x0cc4},
+  {0x0cc6, 0x0cc8},
+  {0x0cca, 0x0ccd},
+  {0x0cd5, 0x0cd6},
+  {0x0cde, 0x0cde},
+  {0x0ce0, 0x0ce3},
+  {0x0ce6, 0x0cef},
+  {0x0cf1, 0x0cf2},
+  {0x0d02, 0x0d03},
+  {0x0d05, 0x0d0c},
+  {0x0d0e, 0x0d10},
+  {0x0d12, 0x0d28},
+  {0x0d2a, 0x0d39},
+  {0x0d3d, 0x0d44},
+  {0x0d46, 0x0d48},
+  {0x0d4a, 0x0d4d},
+  {0x0d57, 0x0d57},
+  {0x0d60, 0x0d63},
+  {0x0d66, 0x0d75},
+  {0x0d79, 0x0d7f},
+  {0x0d82, 0x0d83},
+  {0x0d85, 0x0d96},
+  {0x0d9a, 0x0db1},
+  {0x0db3, 0x0dbb},
+  {0x0dbd, 0x0dbd},
+  {0x0dc0, 0x0dc6},
+  {0x0dca, 0x0dca},
+  {0x0dcf, 0x0dd4},
+  {0x0dd6, 0x0dd6},
+  {0x0dd8, 0x0ddf},
+  {0x0df2, 0x0df4},
+  {0x0e01, 0x0e3a},
+  {0x0e3f, 0x0e5b},
+  {0x0e81, 0x0e82},
+  {0x0e84, 0x0e84},
+  {0x0e87, 0x0e88},
+  {0x0e8a, 0x0e8a},
+  {0x0e8d, 0x0e8d},
+  {0x0e94, 0x0e97},
+  {0x0e99, 0x0e9f},
+  {0x0ea1, 0x0ea3},
+  {0x0ea5, 0x0ea5},
+  {0x0ea7, 0x0ea7},
+  {0x0eaa, 0x0eab},
+  {0x0ead, 0x0eb9},
+  {0x0ebb, 0x0ebd},
+  {0x0ec0, 0x0ec4},
+  {0x0ec6, 0x0ec6},
+  {0x0ec8, 0x0ecd},
+  {0x0ed0, 0x0ed9},
+  {0x0edc, 0x0edd},
+  {0x0f00, 0x0f47},
+  {0x0f49, 0x0f6c},
+  {0x0f71, 0x0f8b},
+  {0x0f90, 0x0f97},
+  {0x0f99, 0x0fbc},
+  {0x0fbe, 0x0fcc},
+  {0x0fce, 0x0fd4},
+  {0x1000, 0x1099},
+  {0x109e, 0x10c5},
+  {0x10d0, 0x10fc},
+  {0x1100, 0x1159},
+  {0x115f, 0x11a2},
+  {0x11a8, 0x11f9},
+  {0x1200, 0x1248},
+  {0x124a, 0x124d},
+  {0x1250, 0x1256},
+  {0x1258, 0x1258},
+  {0x125a, 0x125d},
+  {0x1260, 0x1288},
+  {0x128a, 0x128d},
+  {0x1290, 0x12b0},
+  {0x12b2, 0x12b5},
+  {0x12b8, 0x12be},
+  {0x12c0, 0x12c0},
+  {0x12c2, 0x12c5},
+  {0x12c8, 0x12d6},
+  {0x12d8, 0x1310},
+  {0x1312, 0x1315},
+  {0x1318, 0x135a},
+  {0x135f, 0x137c},
+  {0x1380, 0x1399},
+  {0x13a0, 0x13f4},
+  {0x1401, 0x1676},
+  {0x1680, 0x169c},
+  {0x16a0, 0x16f0},
+  {0x1700, 0x170c},
+  {0x170e, 0x1714},
+  {0x1720, 0x1736},
+  {0x1740, 0x1753},
+  {0x1760, 0x176c},
+  {0x176e, 0x1770},
+  {0x1772, 0x1773},
+  {0x1780, 0x17b3},
+  {0x17b6, 0x17dd},
+  {0x17e0, 0x17e9},
+  {0x17f0, 0x17f9},
+  {0x1800, 0x180e},
+  {0x1810, 0x1819},
+  {0x1820, 0x1877},
+  {0x1880, 0x18aa},
+  {0x1900, 0x191c},
+  {0x1920, 0x192b},
+  {0x1930, 0x193b},
+  {0x1940, 0x1940},
+  {0x1944, 0x196d},
+  {0x1970, 0x1974},
+  {0x1980, 0x19a9},
+  {0x19b0, 0x19c9},
+  {0x19d0, 0x19d9},
+  {0x19de, 0x1a1b},
+  {0x1a1e, 0x1a1f},
+  {0x1b00, 0x1b4b},
+  {0x1b50, 0x1b7c},
+  {0x1b80, 0x1baa},
+  {0x1bae, 0x1bb9},
+  {0x1c00, 0x1c37},
+  {0x1c3b, 0x1c49},
+  {0x1c4d, 0x1c7f},
+  {0x1d00, 0x1de6},
+  {0x1dfe, 0x1f15},
+  {0x1f18, 0x1f1d},
+  {0x1f20, 0x1f45},
+  {0x1f48, 0x1f4d},
+  {0x1f50, 0x1f57},
+  {0x1f59, 0x1f59},
+  {0x1f5b, 0x1f5b},
+  {0x1f5d, 0x1f5d},
+  {0x1f5f, 0x1f7d},
+  {0x1f80, 0x1fb4},
+  {0x1fb6, 0x1fc4},
+  {0x1fc6, 0x1fd3},
+  {0x1fd6, 0x1fdb},
+  {0x1fdd, 0x1fef},
+  {0x1ff2, 0x1ff4},
+  {0x1ff6, 0x1ffe},
+  {0x2000, 0x200a},
+  {0x2010, 0x2029},
+  {0x202f, 0x205f},
+  {0x2070, 0x2071},
+  {0x2074, 0x208e},
+  {0x2090, 0x2094},
+  {0x20a0, 0x20b5},
+  {0x20d0, 0x20f0},
+  {0x2100, 0x214f},
+  {0x2153, 0x2188},
+  {0x2190, 0x23e7},
+  {0x2400, 0x2426},
+  {0x2440, 0x244a},
+  {0x2460, 0x269d},
+  {0x26a0, 0x26bc},
+  {0x26c0, 0x26c3},
+  {0x2701, 0x2704},
+  {0x2706, 0x2709},
+  {0x270c, 0x2727},
+  {0x2729, 0x274b},
+  {0x274d, 0x274d},
+  {0x274f, 0x2752},
+  {0x2756, 0x2756},
+  {0x2758, 0x275e},
+  {0x2761, 0x2794},
+  {0x2798, 0x27af},
+  {0x27b1, 0x27be},
+  {0x27c0, 0x27ca},
+  {0x27cc, 0x27cc},
+  {0x27d0, 0x2b4c},
+  {0x2b50, 0x2b54},
+  {0x2c00, 0x2c2e},
+  {0x2c30, 0x2c5e},
+  {0x2c60, 0x2c6f},
+  {0x2c71, 0x2c7d},
+  {0x2c80, 0x2cea},
+  {0x2cf9, 0x2d25},
+  {0x2d30, 0x2d65},
+  {0x2d6f, 0x2d6f},
+  {0x2d80, 0x2d96},
+  {0x2da0, 0x2da6},
+  {0x2da8, 0x2dae},
+  {0x2db0, 0x2db6},
+  {0x2db8, 0x2dbe},
+  {0x2dc0, 0x2dc6},
+  {0x2dc8, 0x2dce},
+  {0x2dd0, 0x2dd6},
+  {0x2dd8, 0x2dde},
+  {0x2de0, 0x2e30},
+  {0x2e80, 0x2e99},
+  {0x2e9b, 0x2ef3},
+  {0x2f00, 0x2fd5},
+  {0x2ff0, 0x2ffb},
+  {0x3000, 0x303f},
+  {0x3041, 0x3096},
+  {0x3099, 0x30ff},
+  {0x3105, 0x312d},
+  {0x3131, 0x318e},
+  {0x3190, 0x31b7},
+  {0x31c0, 0x31e3},
+  {0x31f0, 0x321e},
+  {0x3220, 0x3243},
+  {0x3250, 0x32fe},
+  {0x3300, 0x4db5},
+  {0x4dc0, 0x9fc3},
+  {0xa000, 0xa48c},
+  {0xa490, 0xa4c6},
+  {0xa500, 0xa62b},
+  {0xa640, 0xa65f},
+  {0xa662, 0xa673},
+  {0xa67c, 0xa697},
+  {0xa700, 0xa78c},
+  {0xa7fb, 0xa82b},
+  {0xa840, 0xa877},
+  {0xa880, 0xa8c4},
+  {0xa8ce, 0xa8d9},
+  {0xa900, 0xa953},
+  {0xa95f, 0xa95f},
+  {0xaa00, 0xaa36},
+  {0xaa40, 0xaa4d},
+  {0xaa50, 0xaa59},
+  {0xaa5c, 0xaa5f},
+  {0xac00, 0xd7a3},
+  {0xf900, 0xfa2d},
+  {0xfa30, 0xfa6a},
+  {0xfa70, 0xfad9},
+  {0xfb00, 0xfb06},
+  {0xfb13, 0xfb17},
+  {0xfb1d, 0xfb36},
+  {0xfb38, 0xfb3c},
+  {0xfb3e, 0xfb3e},
+  {0xfb40, 0xfb41},
+  {0xfb43, 0xfb44},
+  {0xfb46, 0xfbb1},
+  {0xfbd3, 0xfd3f},
+  {0xfd50, 0xfd8f},
+  {0xfd92, 0xfdc7},
+  {0xfdf0, 0xfdfd},
+  {0xfe00, 0xfe19},
+  {0xfe20, 0xfe26},
+  {0xfe30, 0xfe52},
+  {0xfe54, 0xfe66},
+  {0xfe68, 0xfe6b},
+  {0xfe70, 0xfe74},
+  {0xfe76, 0xfefc},
+  {0xff01, 0xffbe},
+  {0xffc2, 0xffc7},
+  {0xffca, 0xffcf},
+  {0xffd2, 0xffd7},
+  {0xffda, 0xffdc},
+  {0xffe0, 0xffe6},
+  {0xffe8, 0xffee},
+  {0xfffc, 0xfffd},
+  {0x10000, 0x1000b},
+  {0x1000d, 0x10026},
+  {0x10028, 0x1003a},
+  {0x1003c, 0x1003d},
+  {0x1003f, 0x1004d},
+  {0x10050, 0x1005d},
+  {0x10080, 0x100fa},
+  {0x10100, 0x10102},
+  {0x10107, 0x10133},
+  {0x10137, 0x1018a},
+  {0x10190, 0x1019b},
+  {0x101d0, 0x101fd},
+  {0x10280, 0x1029c},
+  {0x102a0, 0x102d0},
+  {0x10300, 0x1031e},
+  {0x10320, 0x10323},
+  {0x10330, 0x1034a},
+  {0x10380, 0x1039d},
+  {0x1039f, 0x103c3},
+  {0x103c8, 0x103d5},
+  {0x10400, 0x1049d},
+  {0x104a0, 0x104a9},
+  {0x10800, 0x10805},
+  {0x10808, 0x10808},
+  {0x1080a, 0x10835},
+  {0x10837, 0x10838},
+  {0x1083c, 0x1083c},
+  {0x1083f, 0x1083f},
+  {0x10900, 0x10919},
+  {0x1091f, 0x10939},
+  {0x1093f, 0x1093f},
+  {0x10a00, 0x10a03},
+  {0x10a05, 0x10a06},
+  {0x10a0c, 0x10a13},
+  {0x10a15, 0x10a17},
+  {0x10a19, 0x10a33},
+  {0x10a38, 0x10a3a},
+  {0x10a3f, 0x10a47},
+  {0x10a50, 0x10a58},
+  {0x12000, 0x1236e},
+  {0x12400, 0x12462},
+  {0x12470, 0x12473},
+  {0x1d000, 0x1d0f5},
+  {0x1d100, 0x1d126},
+  {0x1d129, 0x1d172},
+  {0x1d17b, 0x1d1dd},
+  {0x1d200, 0x1d245},
+  {0x1d300, 0x1d356},
+  {0x1d360, 0x1d371},
+  {0x1d400, 0x1d454},
+  {0x1d456, 0x1d49c},
+  {0x1d49e, 0x1d49f},
+  {0x1d4a2, 0x1d4a2},
+  {0x1d4a5, 0x1d4a6},
+  {0x1d4a9, 0x1d4ac},
+  {0x1d4ae, 0x1d4b9},
+  {0x1d4bb, 0x1d4bb},
+  {0x1d4bd, 0x1d4c3},
+  {0x1d4c5, 0x1d505},
+  {0x1d507, 0x1d50a},
+  {0x1d50d, 0x1d514},
+  {0x1d516, 0x1d51c},
+  {0x1d51e, 0x1d539},
+  {0x1d53b, 0x1d53e},
+  {0x1d540, 0x1d544},
+  {0x1d546, 0x1d546},
+  {0x1d54a, 0x1d550},
+  {0x1d552, 0x1d6a5},
+  {0x1d6a8, 0x1d7cb},
+  {0x1d7ce, 0x1d7ff},
+  {0x1f000, 0x1f02b},
+  {0x1f030, 0x1f093},
+  {0x20000, 0x2a6d6},
+  {0x2f800, 0x2fa1d},
+  {0xe0100, 0xe01ef},
+};
+
+scm_t_char_set cs_printing = {
+  447,
+  cs_printing_ranges
+};
+
+scm_t_char_range cs_iso_control_ranges[] = {
+  {0x0000, 0x001f},
+  {0x007f, 0x009f},
+};
+
+scm_t_char_set cs_iso_control = {
+  2,
+  cs_iso_control_ranges
+};
+
+scm_t_char_range cs_punctuation_ranges[] = {
+  {0x0021, 0x0023},
+  {0x0025, 0x002a},
+  {0x002c, 0x002f},
+  {0x003a, 0x003b},
+  {0x003f, 0x0040},
+  {0x005b, 0x005d},
+  {0x005f, 0x005f},
+  {0x007b, 0x007b},
+  {0x007d, 0x007d},
+  {0x00a1, 0x00a1},
+  {0x00ab, 0x00ab},
+  {0x00b7, 0x00b7},
+  {0x00bb, 0x00bb},
+  {0x00bf, 0x00bf},
+  {0x037e, 0x037e},
+  {0x0387, 0x0387},
+  {0x055a, 0x055f},
+  {0x0589, 0x058a},
+  {0x05be, 0x05be},
+  {0x05c0, 0x05c0},
+  {0x05c3, 0x05c3},
+  {0x05c6, 0x05c6},
+  {0x05f3, 0x05f4},
+  {0x0609, 0x060a},
+  {0x060c, 0x060d},
+  {0x061b, 0x061b},
+  {0x061e, 0x061f},
+  {0x066a, 0x066d},
+  {0x06d4, 0x06d4},
+  {0x0700, 0x070d},
+  {0x07f7, 0x07f9},
+  {0x0964, 0x0965},
+  {0x0970, 0x0970},
+  {0x0df4, 0x0df4},
+  {0x0e4f, 0x0e4f},
+  {0x0e5a, 0x0e5b},
+  {0x0f04, 0x0f12},
+  {0x0f3a, 0x0f3d},
+  {0x0f85, 0x0f85},
+  {0x0fd0, 0x0fd4},
+  {0x104a, 0x104f},
+  {0x10fb, 0x10fb},
+  {0x1361, 0x1368},
+  {0x166d, 0x166e},
+  {0x169b, 0x169c},
+  {0x16eb, 0x16ed},
+  {0x1735, 0x1736},
+  {0x17d4, 0x17d6},
+  {0x17d8, 0x17da},
+  {0x1800, 0x180a},
+  {0x1944, 0x1945},
+  {0x19de, 0x19df},
+  {0x1a1e, 0x1a1f},
+  {0x1b5a, 0x1b60},
+  {0x1c3b, 0x1c3f},
+  {0x1c7e, 0x1c7f},
+  {0x2010, 0x2027},
+  {0x2030, 0x2043},
+  {0x2045, 0x2051},
+  {0x2053, 0x205e},
+  {0x207d, 0x207e},
+  {0x208d, 0x208e},
+  {0x2329, 0x232a},
+  {0x2768, 0x2775},
+  {0x27c5, 0x27c6},
+  {0x27e6, 0x27ef},
+  {0x2983, 0x2998},
+  {0x29d8, 0x29db},
+  {0x29fc, 0x29fd},
+  {0x2cf9, 0x2cfc},
+  {0x2cfe, 0x2cff},
+  {0x2e00, 0x2e2e},
+  {0x2e30, 0x2e30},
+  {0x3001, 0x3003},
+  {0x3008, 0x3011},
+  {0x3014, 0x301f},
+  {0x3030, 0x3030},
+  {0x303d, 0x303d},
+  {0x30a0, 0x30a0},
+  {0x30fb, 0x30fb},
+  {0xa60d, 0xa60f},
+  {0xa673, 0xa673},
+  {0xa67e, 0xa67e},
+  {0xa874, 0xa877},
+  {0xa8ce, 0xa8cf},
+  {0xa92e, 0xa92f},
+  {0xa95f, 0xa95f},
+  {0xaa5c, 0xaa5f},
+  {0xfd3e, 0xfd3f},
+  {0xfe10, 0xfe19},
+  {0xfe30, 0xfe52},
+  {0xfe54, 0xfe61},
+  {0xfe63, 0xfe63},
+  {0xfe68, 0xfe68},
+  {0xfe6a, 0xfe6b},
+  {0xff01, 0xff03},
+  {0xff05, 0xff0a},
+  {0xff0c, 0xff0f},
+  {0xff1a, 0xff1b},
+  {0xff1f, 0xff20},
+  {0xff3b, 0xff3d},
+  {0xff3f, 0xff3f},
+  {0xff5b, 0xff5b},
+  {0xff5d, 0xff5d},
+  {0xff5f, 0xff65},
+  {0x10100, 0x10101},
+  {0x1039f, 0x1039f},
+  {0x103d0, 0x103d0},
+  {0x1091f, 0x1091f},
+  {0x1093f, 0x1093f},
+  {0x10a50, 0x10a58},
+  {0x12470, 0x12473},
+};
+
+scm_t_char_set cs_punctuation = {
+  112,
+  cs_punctuation_ranges
+};
+
+scm_t_char_range cs_symbol_ranges[] = {
+  {0x0024, 0x0024},
+  {0x002b, 0x002b},
+  {0x003c, 0x003e},
+  {0x005e, 0x005e},
+  {0x0060, 0x0060},
+  {0x007c, 0x007c},
+  {0x007e, 0x007e},
+  {0x00a2, 0x00a9},
+  {0x00ac, 0x00ac},
+  {0x00ae, 0x00b1},
+  {0x00b4, 0x00b4},
+  {0x00b6, 0x00b6},
+  {0x00b8, 0x00b8},
+  {0x00d7, 0x00d7},
+  {0x00f7, 0x00f7},
+  {0x02c2, 0x02c5},
+  {0x02d2, 0x02df},
+  {0x02e5, 0x02eb},
+  {0x02ed, 0x02ed},
+  {0x02ef, 0x02ff},
+  {0x0375, 0x0375},
+  {0x0384, 0x0385},
+  {0x03f6, 0x03f6},
+  {0x0482, 0x0482},
+  {0x0606, 0x0608},
+  {0x060b, 0x060b},
+  {0x060e, 0x060f},
+  {0x06e9, 0x06e9},
+  {0x06fd, 0x06fe},
+  {0x07f6, 0x07f6},
+  {0x09f2, 0x09f3},
+  {0x09fa, 0x09fa},
+  {0x0af1, 0x0af1},
+  {0x0b70, 0x0b70},
+  {0x0bf3, 0x0bfa},
+  {0x0c7f, 0x0c7f},
+  {0x0cf1, 0x0cf2},
+  {0x0d79, 0x0d79},
+  {0x0e3f, 0x0e3f},
+  {0x0f01, 0x0f03},
+  {0x0f13, 0x0f17},
+  {0x0f1a, 0x0f1f},
+  {0x0f34, 0x0f34},
+  {0x0f36, 0x0f36},
+  {0x0f38, 0x0f38},
+  {0x0fbe, 0x0fc5},
+  {0x0fc7, 0x0fcc},
+  {0x0fce, 0x0fcf},
+  {0x109e, 0x109f},
+  {0x1360, 0x1360},
+  {0x1390, 0x1399},
+  {0x17db, 0x17db},
+  {0x1940, 0x1940},
+  {0x19e0, 0x19ff},
+  {0x1b61, 0x1b6a},
+  {0x1b74, 0x1b7c},
+  {0x1fbd, 0x1fbd},
+  {0x1fbf, 0x1fc1},
+  {0x1fcd, 0x1fcf},
+  {0x1fdd, 0x1fdf},
+  {0x1fed, 0x1fef},
+  {0x1ffd, 0x1ffe},
+  {0x2044, 0x2044},
+  {0x2052, 0x2052},
+  {0x207a, 0x207c},
+  {0x208a, 0x208c},
+  {0x20a0, 0x20b5},
+  {0x2100, 0x2101},
+  {0x2103, 0x2106},
+  {0x2108, 0x2109},
+  {0x2114, 0x2114},
+  {0x2116, 0x2118},
+  {0x211e, 0x2123},
+  {0x2125, 0x2125},
+  {0x2127, 0x2127},
+  {0x2129, 0x2129},
+  {0x212e, 0x212e},
+  {0x213a, 0x213b},
+  {0x2140, 0x2144},
+  {0x214a, 0x214d},
+  {0x214f, 0x214f},
+  {0x2190, 0x2328},
+  {0x232b, 0x23e7},
+  {0x2400, 0x2426},
+  {0x2440, 0x244a},
+  {0x249c, 0x24e9},
+  {0x2500, 0x269d},
+  {0x26a0, 0x26bc},
+  {0x26c0, 0x26c3},
+  {0x2701, 0x2704},
+  {0x2706, 0x2709},
+  {0x270c, 0x2727},
+  {0x2729, 0x274b},
+  {0x274d, 0x274d},
+  {0x274f, 0x2752},
+  {0x2756, 0x2756},
+  {0x2758, 0x275e},
+  {0x2761, 0x2767},
+  {0x2794, 0x2794},
+  {0x2798, 0x27af},
+  {0x27b1, 0x27be},
+  {0x27c0, 0x27c4},
+  {0x27c7, 0x27ca},
+  {0x27cc, 0x27cc},
+  {0x27d0, 0x27e5},
+  {0x27f0, 0x2982},
+  {0x2999, 0x29d7},
+  {0x29dc, 0x29fb},
+  {0x29fe, 0x2b4c},
+  {0x2b50, 0x2b54},
+  {0x2ce5, 0x2cea},
+  {0x2e80, 0x2e99},
+  {0x2e9b, 0x2ef3},
+  {0x2f00, 0x2fd5},
+  {0x2ff0, 0x2ffb},
+  {0x3004, 0x3004},
+  {0x3012, 0x3013},
+  {0x3020, 0x3020},
+  {0x3036, 0x3037},
+  {0x303e, 0x303f},
+  {0x309b, 0x309c},
+  {0x3190, 0x3191},
+  {0x3196, 0x319f},
+  {0x31c0, 0x31e3},
+  {0x3200, 0x321e},
+  {0x322a, 0x3243},
+  {0x3250, 0x3250},
+  {0x3260, 0x327f},
+  {0x328a, 0x32b0},
+  {0x32c0, 0x32fe},
+  {0x3300, 0x33ff},
+  {0x4dc0, 0x4dff},
+  {0xa490, 0xa4c6},
+  {0xa700, 0xa716},
+  {0xa720, 0xa721},
+  {0xa789, 0xa78a},
+  {0xa828, 0xa82b},
+  {0xfb29, 0xfb29},
+  {0xfdfc, 0xfdfd},
+  {0xfe62, 0xfe62},
+  {0xfe64, 0xfe66},
+  {0xfe69, 0xfe69},
+  {0xff04, 0xff04},
+  {0xff0b, 0xff0b},
+  {0xff1c, 0xff1e},
+  {0xff3e, 0xff3e},
+  {0xff40, 0xff40},
+  {0xff5c, 0xff5c},
+  {0xff5e, 0xff5e},
+  {0xffe0, 0xffe6},
+  {0xffe8, 0xffee},
+  {0xfffc, 0xfffd},
+  {0x10102, 0x10102},
+  {0x10137, 0x1013f},
+  {0x10179, 0x10189},
+  {0x10190, 0x1019b},
+  {0x101d0, 0x101fc},
+  {0x1d000, 0x1d0f5},
+  {0x1d100, 0x1d126},
+  {0x1d129, 0x1d164},
+  {0x1d16a, 0x1d16c},
+  {0x1d183, 0x1d184},
+  {0x1d18c, 0x1d1a9},
+  {0x1d1ae, 0x1d1dd},
+  {0x1d200, 0x1d241},
+  {0x1d245, 0x1d245},
+  {0x1d300, 0x1d356},
+  {0x1d6c1, 0x1d6c1},
+  {0x1d6db, 0x1d6db},
+  {0x1d6fb, 0x1d6fb},
+  {0x1d715, 0x1d715},
+  {0x1d735, 0x1d735},
+  {0x1d74f, 0x1d74f},
+  {0x1d76f, 0x1d76f},
+  {0x1d789, 0x1d789},
+  {0x1d7a9, 0x1d7a9},
+  {0x1d7c3, 0x1d7c3},
+  {0x1f000, 0x1f02b},
+  {0x1f030, 0x1f093},
+};
+
+scm_t_char_set cs_symbol = {
+  179,
+  cs_symbol_ranges
+};
+
+scm_t_char_range cs_blank_ranges[] = {
+  {0x0009, 0x0009},
+  {0x0020, 0x0020},
+  {0x00a0, 0x00a0},
+  {0x1680, 0x1680},
+  {0x180e, 0x180e},
+  {0x2000, 0x200a},
+  {0x202f, 0x202f},
+  {0x205f, 0x205f},
+  {0x3000, 0x3000},
+};
+
+scm_t_char_set cs_blank = {
+  9,
+  cs_blank_ranges
+};
+
+scm_t_char_range cs_ascii_ranges[] = {
+  {0x0000, 0x007f},
+};
+
+scm_t_char_set cs_ascii = {
+  0,
+  cs_ascii_ranges
+};
+
+scm_t_char_range cs_empty_ranges[] = {
+};
+
+scm_t_char_set cs_empty = {
+  0,
+  cs_empty_ranges
+};
+
+scm_t_char_range cs_full_ranges[] = {
+  {0x0000, 0x0377},
+  {0x037a, 0x037e},
+  {0x0384, 0x038a},
+  {0x038c, 0x038c},
+  {0x038e, 0x03a1},
+  {0x03a3, 0x0523},
+  {0x0531, 0x0556},
+  {0x0559, 0x055f},
+  {0x0561, 0x0587},
+  {0x0589, 0x058a},
+  {0x0591, 0x05c7},
+  {0x05d0, 0x05ea},
+  {0x05f0, 0x05f4},
+  {0x0600, 0x0603},
+  {0x0606, 0x061b},
+  {0x061e, 0x061f},
+  {0x0621, 0x065e},
+  {0x0660, 0x070d},
+  {0x070f, 0x074a},
+  {0x074d, 0x07b1},
+  {0x07c0, 0x07fa},
+  {0x0901, 0x0939},
+  {0x093c, 0x094d},
+  {0x0950, 0x0954},
+  {0x0958, 0x0972},
+  {0x097b, 0x097f},
+  {0x0981, 0x0983},
+  {0x0985, 0x098c},
+  {0x098f, 0x0990},
+  {0x0993, 0x09a8},
+  {0x09aa, 0x09b0},
+  {0x09b2, 0x09b2},
+  {0x09b6, 0x09b9},
+  {0x09bc, 0x09c4},
+  {0x09c7, 0x09c8},
+  {0x09cb, 0x09ce},
+  {0x09d7, 0x09d7},
+  {0x09dc, 0x09dd},
+  {0x09df, 0x09e3},
+  {0x09e6, 0x09fa},
+  {0x0a01, 0x0a03},
+  {0x0a05, 0x0a0a},
+  {0x0a0f, 0x0a10},
+  {0x0a13, 0x0a28},
+  {0x0a2a, 0x0a30},
+  {0x0a32, 0x0a33},
+  {0x0a35, 0x0a36},
+  {0x0a38, 0x0a39},
+  {0x0a3c, 0x0a3c},
+  {0x0a3e, 0x0a42},
+  {0x0a47, 0x0a48},
+  {0x0a4b, 0x0a4d},
+  {0x0a51, 0x0a51},
+  {0x0a59, 0x0a5c},
+  {0x0a5e, 0x0a5e},
+  {0x0a66, 0x0a75},
+  {0x0a81, 0x0a83},
+  {0x0a85, 0x0a8d},
+  {0x0a8f, 0x0a91},
+  {0x0a93, 0x0aa8},
+  {0x0aaa, 0x0ab0},
+  {0x0ab2, 0x0ab3},
+  {0x0ab5, 0x0ab9},
+  {0x0abc, 0x0ac5},
+  {0x0ac7, 0x0ac9},
+  {0x0acb, 0x0acd},
+  {0x0ad0, 0x0ad0},
+  {0x0ae0, 0x0ae3},
+  {0x0ae6, 0x0aef},
+  {0x0af1, 0x0af1},
+  {0x0b01, 0x0b03},
+  {0x0b05, 0x0b0c},
+  {0x0b0f, 0x0b10},
+  {0x0b13, 0x0b28},
+  {0x0b2a, 0x0b30},
+  {0x0b32, 0x0b33},
+  {0x0b35, 0x0b39},
+  {0x0b3c, 0x0b44},
+  {0x0b47, 0x0b48},
+  {0x0b4b, 0x0b4d},
+  {0x0b56, 0x0b57},
+  {0x0b5c, 0x0b5d},
+  {0x0b5f, 0x0b63},
+  {0x0b66, 0x0b71},
+  {0x0b82, 0x0b83},
+  {0x0b85, 0x0b8a},
+  {0x0b8e, 0x0b90},
+  {0x0b92, 0x0b95},
+  {0x0b99, 0x0b9a},
+  {0x0b9c, 0x0b9c},
+  {0x0b9e, 0x0b9f},
+  {0x0ba3, 0x0ba4},
+  {0x0ba8, 0x0baa},
+  {0x0bae, 0x0bb9},
+  {0x0bbe, 0x0bc2},
+  {0x0bc6, 0x0bc8},
+  {0x0bca, 0x0bcd},
+  {0x0bd0, 0x0bd0},
+  {0x0bd7, 0x0bd7},
+  {0x0be6, 0x0bfa},
+  {0x0c01, 0x0c03},
+  {0x0c05, 0x0c0c},
+  {0x0c0e, 0x0c10},
+  {0x0c12, 0x0c28},
+  {0x0c2a, 0x0c33},
+  {0x0c35, 0x0c39},
+  {0x0c3d, 0x0c44},
+  {0x0c46, 0x0c48},
+  {0x0c4a, 0x0c4d},
+  {0x0c55, 0x0c56},
+  {0x0c58, 0x0c59},
+  {0x0c60, 0x0c63},
+  {0x0c66, 0x0c6f},
+  {0x0c78, 0x0c7f},
+  {0x0c82, 0x0c83},
+  {0x0c85, 0x0c8c},
+  {0x0c8e, 0x0c90},
+  {0x0c92, 0x0ca8},
+  {0x0caa, 0x0cb3},
+  {0x0cb5, 0x0cb9},
+  {0x0cbc, 0x0cc4},
+  {0x0cc6, 0x0cc8},
+  {0x0cca, 0x0ccd},
+  {0x0cd5, 0x0cd6},
+  {0x0cde, 0x0cde},
+  {0x0ce0, 0x0ce3},
+  {0x0ce6, 0x0cef},
+  {0x0cf1, 0x0cf2},
+  {0x0d02, 0x0d03},
+  {0x0d05, 0x0d0c},
+  {0x0d0e, 0x0d10},
+  {0x0d12, 0x0d28},
+  {0x0d2a, 0x0d39},
+  {0x0d3d, 0x0d44},
+  {0x0d46, 0x0d48},
+  {0x0d4a, 0x0d4d},
+  {0x0d57, 0x0d57},
+  {0x0d60, 0x0d63},
+  {0x0d66, 0x0d75},
+  {0x0d79, 0x0d7f},
+  {0x0d82, 0x0d83},
+  {0x0d85, 0x0d96},
+  {0x0d9a, 0x0db1},
+  {0x0db3, 0x0dbb},
+  {0x0dbd, 0x0dbd},
+  {0x0dc0, 0x0dc6},
+  {0x0dca, 0x0dca},
+  {0x0dcf, 0x0dd4},
+  {0x0dd6, 0x0dd6},
+  {0x0dd8, 0x0ddf},
+  {0x0df2, 0x0df4},
+  {0x0e01, 0x0e3a},
+  {0x0e3f, 0x0e5b},
+  {0x0e81, 0x0e82},
+  {0x0e84, 0x0e84},
+  {0x0e87, 0x0e88},
+  {0x0e8a, 0x0e8a},
+  {0x0e8d, 0x0e8d},
+  {0x0e94, 0x0e97},
+  {0x0e99, 0x0e9f},
+  {0x0ea1, 0x0ea3},
+  {0x0ea5, 0x0ea5},
+  {0x0ea7, 0x0ea7},
+  {0x0eaa, 0x0eab},
+  {0x0ead, 0x0eb9},
+  {0x0ebb, 0x0ebd},
+  {0x0ec0, 0x0ec4},
+  {0x0ec6, 0x0ec6},
+  {0x0ec8, 0x0ecd},
+  {0x0ed0, 0x0ed9},
+  {0x0edc, 0x0edd},
+  {0x0f00, 0x0f47},
+  {0x0f49, 0x0f6c},
+  {0x0f71, 0x0f8b},
+  {0x0f90, 0x0f97},
+  {0x0f99, 0x0fbc},
+  {0x0fbe, 0x0fcc},
+  {0x0fce, 0x0fd4},
+  {0x1000, 0x1099},
+  {0x109e, 0x10c5},
+  {0x10d0, 0x10fc},
+  {0x1100, 0x1159},
+  {0x115f, 0x11a2},
+  {0x11a8, 0x11f9},
+  {0x1200, 0x1248},
+  {0x124a, 0x124d},
+  {0x1250, 0x1256},
+  {0x1258, 0x1258},
+  {0x125a, 0x125d},
+  {0x1260, 0x1288},
+  {0x128a, 0x128d},
+  {0x1290, 0x12b0},
+  {0x12b2, 0x12b5},
+  {0x12b8, 0x12be},
+  {0x12c0, 0x12c0},
+  {0x12c2, 0x12c5},
+  {0x12c8, 0x12d6},
+  {0x12d8, 0x1310},
+  {0x1312, 0x1315},
+  {0x1318, 0x135a},
+  {0x135f, 0x137c},
+  {0x1380, 0x1399},
+  {0x13a0, 0x13f4},
+  {0x1401, 0x1676},
+  {0x1680, 0x169c},
+  {0x16a0, 0x16f0},
+  {0x1700, 0x170c},
+  {0x170e, 0x1714},
+  {0x1720, 0x1736},
+  {0x1740, 0x1753},
+  {0x1760, 0x176c},
+  {0x176e, 0x1770},
+  {0x1772, 0x1773},
+  {0x1780, 0x17dd},
+  {0x17e0, 0x17e9},
+  {0x17f0, 0x17f9},
+  {0x1800, 0x180e},
+  {0x1810, 0x1819},
+  {0x1820, 0x1877},
+  {0x1880, 0x18aa},
+  {0x1900, 0x191c},
+  {0x1920, 0x192b},
+  {0x1930, 0x193b},
+  {0x1940, 0x1940},
+  {0x1944, 0x196d},
+  {0x1970, 0x1974},
+  {0x1980, 0x19a9},
+  {0x19b0, 0x19c9},
+  {0x19d0, 0x19d9},
+  {0x19de, 0x1a1b},
+  {0x1a1e, 0x1a1f},
+  {0x1b00, 0x1b4b},
+  {0x1b50, 0x1b7c},
+  {0x1b80, 0x1baa},
+  {0x1bae, 0x1bb9},
+  {0x1c00, 0x1c37},
+  {0x1c3b, 0x1c49},
+  {0x1c4d, 0x1c7f},
+  {0x1d00, 0x1de6},
+  {0x1dfe, 0x1f15},
+  {0x1f18, 0x1f1d},
+  {0x1f20, 0x1f45},
+  {0x1f48, 0x1f4d},
+  {0x1f50, 0x1f57},
+  {0x1f59, 0x1f59},
+  {0x1f5b, 0x1f5b},
+  {0x1f5d, 0x1f5d},
+  {0x1f5f, 0x1f7d},
+  {0x1f80, 0x1fb4},
+  {0x1fb6, 0x1fc4},
+  {0x1fc6, 0x1fd3},
+  {0x1fd6, 0x1fdb},
+  {0x1fdd, 0x1fef},
+  {0x1ff2, 0x1ff4},
+  {0x1ff6, 0x1ffe},
+  {0x2000, 0x2064},
+  {0x206a, 0x2071},
+  {0x2074, 0x208e},
+  {0x2090, 0x2094},
+  {0x20a0, 0x20b5},
+  {0x20d0, 0x20f0},
+  {0x2100, 0x214f},
+  {0x2153, 0x2188},
+  {0x2190, 0x23e7},
+  {0x2400, 0x2426},
+  {0x2440, 0x244a},
+  {0x2460, 0x269d},
+  {0x26a0, 0x26bc},
+  {0x26c0, 0x26c3},
+  {0x2701, 0x2704},
+  {0x2706, 0x2709},
+  {0x270c, 0x2727},
+  {0x2729, 0x274b},
+  {0x274d, 0x274d},
+  {0x274f, 0x2752},
+  {0x2756, 0x2756},
+  {0x2758, 0x275e},
+  {0x2761, 0x2794},
+  {0x2798, 0x27af},
+  {0x27b1, 0x27be},
+  {0x27c0, 0x27ca},
+  {0x27cc, 0x27cc},
+  {0x27d0, 0x2b4c},
+  {0x2b50, 0x2b54},
+  {0x2c00, 0x2c2e},
+  {0x2c30, 0x2c5e},
+  {0x2c60, 0x2c6f},
+  {0x2c71, 0x2c7d},
+  {0x2c80, 0x2cea},
+  {0x2cf9, 0x2d25},
+  {0x2d30, 0x2d65},
+  {0x2d6f, 0x2d6f},
+  {0x2d80, 0x2d96},
+  {0x2da0, 0x2da6},
+  {0x2da8, 0x2dae},
+  {0x2db0, 0x2db6},
+  {0x2db8, 0x2dbe},
+  {0x2dc0, 0x2dc6},
+  {0x2dc8, 0x2dce},
+  {0x2dd0, 0x2dd6},
+  {0x2dd8, 0x2dde},
+  {0x2de0, 0x2e30},
+  {0x2e80, 0x2e99},
+  {0x2e9b, 0x2ef3},
+  {0x2f00, 0x2fd5},
+  {0x2ff0, 0x2ffb},
+  {0x3000, 0x303f},
+  {0x3041, 0x3096},
+  {0x3099, 0x30ff},
+  {0x3105, 0x312d},
+  {0x3131, 0x318e},
+  {0x3190, 0x31b7},
+  {0x31c0, 0x31e3},
+  {0x31f0, 0x321e},
+  {0x3220, 0x3243},
+  {0x3250, 0x32fe},
+  {0x3300, 0x4db5},
+  {0x4dc0, 0x9fc3},
+  {0xa000, 0xa48c},
+  {0xa490, 0xa4c6},
+  {0xa500, 0xa62b},
+  {0xa640, 0xa65f},
+  {0xa662, 0xa673},
+  {0xa67c, 0xa697},
+  {0xa700, 0xa78c},
+  {0xa7fb, 0xa82b},
+  {0xa840, 0xa877},
+  {0xa880, 0xa8c4},
+  {0xa8ce, 0xa8d9},
+  {0xa900, 0xa953},
+  {0xa95f, 0xa95f},
+  {0xaa00, 0xaa36},
+  {0xaa40, 0xaa4d},
+  {0xaa50, 0xaa59},
+  {0xaa5c, 0xaa5f},
+  {0xac00, 0xd7a3},
+  {0xd800, 0xfa2d},
+  {0xfa30, 0xfa6a},
+  {0xfa70, 0xfad9},
+  {0xfb00, 0xfb06},
+  {0xfb13, 0xfb17},
+  {0xfb1d, 0xfb36},
+  {0xfb38, 0xfb3c},
+  {0xfb3e, 0xfb3e},
+  {0xfb40, 0xfb41},
+  {0xfb43, 0xfb44},
+  {0xfb46, 0xfbb1},
+  {0xfbd3, 0xfd3f},
+  {0xfd50, 0xfd8f},
+  {0xfd92, 0xfdc7},
+  {0xfdf0, 0xfdfd},
+  {0xfe00, 0xfe19},
+  {0xfe20, 0xfe26},
+  {0xfe30, 0xfe52},
+  {0xfe54, 0xfe66},
+  {0xfe68, 0xfe6b},
+  {0xfe70, 0xfe74},
+  {0xfe76, 0xfefc},
+  {0xfeff, 0xfeff},
+  {0xff01, 0xffbe},
+  {0xffc2, 0xffc7},
+  {0xffca, 0xffcf},
+  {0xffd2, 0xffd7},
+  {0xffda, 0xffdc},
+  {0xffe0, 0xffe6},
+  {0xffe8, 0xffee},
+  {0xfff9, 0xfffd},
+  {0x10000, 0x1000b},
+  {0x1000d, 0x10026},
+  {0x10028, 0x1003a},
+  {0x1003c, 0x1003d},
+  {0x1003f, 0x1004d},
+  {0x10050, 0x1005d},
+  {0x10080, 0x100fa},
+  {0x10100, 0x10102},
+  {0x10107, 0x10133},
+  {0x10137, 0x1018a},
+  {0x10190, 0x1019b},
+  {0x101d0, 0x101fd},
+  {0x10280, 0x1029c},
+  {0x102a0, 0x102d0},
+  {0x10300, 0x1031e},
+  {0x10320, 0x10323},
+  {0x10330, 0x1034a},
+  {0x10380, 0x1039d},
+  {0x1039f, 0x103c3},
+  {0x103c8, 0x103d5},
+  {0x10400, 0x1049d},
+  {0x104a0, 0x104a9},
+  {0x10800, 0x10805},
+  {0x10808, 0x10808},
+  {0x1080a, 0x10835},
+  {0x10837, 0x10838},
+  {0x1083c, 0x1083c},
+  {0x1083f, 0x1083f},
+  {0x10900, 0x10919},
+  {0x1091f, 0x10939},
+  {0x1093f, 0x1093f},
+  {0x10a00, 0x10a03},
+  {0x10a05, 0x10a06},
+  {0x10a0c, 0x10a13},
+  {0x10a15, 0x10a17},
+  {0x10a19, 0x10a33},
+  {0x10a38, 0x10a3a},
+  {0x10a3f, 0x10a47},
+  {0x10a50, 0x10a58},
+  {0x12000, 0x1236e},
+  {0x12400, 0x12462},
+  {0x12470, 0x12473},
+  {0x1d000, 0x1d0f5},
+  {0x1d100, 0x1d126},
+  {0x1d129, 0x1d1dd},
+  {0x1d200, 0x1d245},
+  {0x1d300, 0x1d356},
+  {0x1d360, 0x1d371},
+  {0x1d400, 0x1d454},
+  {0x1d456, 0x1d49c},
+  {0x1d49e, 0x1d49f},
+  {0x1d4a2, 0x1d4a2},
+  {0x1d4a5, 0x1d4a6},
+  {0x1d4a9, 0x1d4ac},
+  {0x1d4ae, 0x1d4b9},
+  {0x1d4bb, 0x1d4bb},
+  {0x1d4bd, 0x1d4c3},
+  {0x1d4c5, 0x1d505},
+  {0x1d507, 0x1d50a},
+  {0x1d50d, 0x1d514},
+  {0x1d516, 0x1d51c},
+  {0x1d51e, 0x1d539},
+  {0x1d53b, 0x1d53e},
+  {0x1d540, 0x1d544},
+  {0x1d546, 0x1d546},
+  {0x1d54a, 0x1d550},
+  {0x1d552, 0x1d6a5},
+  {0x1d6a8, 0x1d7cb},
+  {0x1d7ce, 0x1d7ff},
+  {0x1f000, 0x1f02b},
+  {0x1f030, 0x1f093},
+  {0x20000, 0x2a6d6},
+  {0x2f800, 0x2fa1d},
+  {0xe0001, 0xe0001},
+  {0xe0020, 0xe007f},
+  {0xe0100, 0xe01ef},
+  {0xf0000, 0xffffd},
+  {0x100000, 0x10fffd},
+};
+
+scm_t_char_set cs_full = {
+  445,
+  cs_full_ranges
+};
+
diff --git a/libguile/unidata_to_charset.pl b/libguile/unidata_to_charset.pl
new file mode 100755
index 0000000..4782406
--- /dev/null
+++ b/libguile/unidata_to_charset.pl
@@ -0,0 +1,395 @@
+#!/usr/bin/perl
+# unidata_to_charset.pl --- Compute SRFI-14 charsets from UnicodeData.txt
+#
+# Copyright (C) 2009 Free Software Foundation, Inc.
+# 
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+# 
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+# 
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+open(my $in,  "<",  "UnicodeData.txt")  or die "Can't open UnicodeData.txt: 
$!";           
+open(my $out, ">",  "srfi-14.i.c") or die "Can't open srfi-14.i.c: $!";
+
+# For Unicode, we follow Java's specification: a character is
+# lowercase if
+#    * it is not in the range [U+2000,U+2FFF], and
+#    * the Unicode attribute table does not give a lowercase mapping
+#      for it, and
+#    * at least one of the following is true:
+#          o the Unicode attribute table gives a mapping to uppercase
+#            for the character, or
+#          o the name for the character in the Unicode attribute table
+#            contains the words "SMALL LETTER" or "SMALL LIGATURE".
+
+sub lower_case {
+    my($codepoint, $name, $category, $uppercase, $lowercase)= @_;
+    if (($codepoint < 0x2000 || $codepoint > 0x2FFF)
+        && (!defined($lowercase) || $lowercase eq "")
+        && ((defined($uppercase) && $uppercase ne "")
+            || ($name =~ /(SMALL LETTER|SMALL LIGATURE)/))) {
+        return 1;
+    } else {
+        return 0;
+    }
+}
+
+# For Unicode, we follow Java's specification: a character is
+# uppercase if
+#    * it is not in the range [U+2000,U+2FFF], and
+#    * the Unicode attribute table does not give an uppercase mapping
+#      for it (this excludes titlecase characters), and
+#    * at least one of the following is true:
+#          o the Unicode attribute table gives a mapping to lowercase
+#            for the character, or
+#          o the name for the character in the Unicode attribute table
+#            contains the words "CAPITAL LETTER" or "CAPITAL LIGATURE".
+
+sub upper_case {
+    my($codepoint, $name, $category, $uppercase, $lowercase)= @_;
+    if (($codepoint < 0x2000 || $codepoint > 0x2FFF)
+        && (!defined($uppercase) || $uppercase eq "")
+        && ((defined($lowercase) && $lowercase ne "")
+            || ($name =~ /(CAPITAL LETTER|CAPITAL LIGATURE)/))) {
+        return 1;
+    } else {
+        return 0;
+    }
+}
+
+# A character is titlecase if it has the category Lt in the character
+# attribute database.
+
+sub title_case {
+    my($codepoint, $name, $category, $uppercase, $lowercase)= @_;
+    if (defined($category) && $category eq "Lt") {
+        return 1;
+    } else {
+        return 0;
+    }
+}
+
+# A letter is any character with one of the letter categories (Lu, Ll,
+# Lt, Lm, Lo) in the Unicode character database.
+
+sub letter {
+    my($codepoint, $name, $category, $uppercase, $lowercase)= @_;
+    if (defined($category) && ($category eq "Lu"
+                               || $category eq "Ll"
+                               || $category eq "Lt"
+                               || $category eq "Lm"
+                               || $category eq "Lo")) {
+        return 1;
+    } else {
+        return 0;
+    }
+}
+
+# A character is a digit if it has the category Nd in the character
+# attribute database. In Latin-1 and ASCII, the only such characters
+# are 0123456789. In Unicode, there are other digit characters in
+# other code blocks, such as Gujarati digits and Tibetan digits.
+
+sub digit {
+    my($codepoint, $name, $category, $uppercase, $lowercase)= @_;
+    if (defined($category) && $category eq "Nd") {
+        return 1;
+    } else {
+        return 0;
+    }
+}
+
+# The only hex digits are 0123456789abcdefABCDEF. 
+
+sub hex_digit {
+    my($codepoint, $name, $category, $uppercase, $lowercase)= @_;
+    if (($codepoint >= 0x30 && $codepoint <= 0x39)
+        || ($codepoint >= 0x41 && $codepoint <= 0x46)
+        || ($codepoint >= 0x61 && $codepoint <= 0x66)) {
+        return 1;
+    } else {
+        return 0;
+    }
+}
+
+# The union of char-set:letter and char-set:digit.
+
+sub letter_plus_digit {
+    my($codepoint, $name, $category, $uppercase, $lowercase)= @_;
+    if (letter($codepoint, $name, $category, $uppercase, $lowercase)
+        || digit($codepoint, $name, $category, $uppercase, $lowercase)) {
+        return 1;
+    } else {
+        return 0;
+    }
+}
+
+# Characters that would 'use ink' when printed
+sub graphic {
+    my($codepoint, $name, $category, $uppercase, $lowercase)= @_;
+    if ($category =~ (/L|M|N|P|S/)) {
+        return 1;
+    } else {
+        return 0;
+    }
+}
+
+# A whitespace character is either
+#    * a character with one of the space, line, or paragraph separator
+#      categories (Zs, Zl or Zp) of the Unicode character database.
+#    * U+0009 Horizontal tabulation (\t control-I)
+#    * U+000A Line feed (\n control-J)
+#    * U+000B Vertical tabulation (\v control-K)
+#    * U+000C Form feed (\f control-L)
+#    * U+000D Carriage return (\r control-M)
+
+sub whitespace {
+    my($codepoint, $name, $category, $uppercase, $lowercase)= @_;
+    if ($category =~ (/Zs|Zl|Zp/)
+        || $codepoint == 0x9
+        || $codepoint == 0xA 
+        || $codepoint == 0xB 
+        || $codepoint == 0xC 
+        || $codepoint == 0xD) { 
+        return 1;
+    } else {
+        return 0;
+    }
+}
+
+# A printing character is one that would occupy space when printed,
+# i.e., a graphic character or a space character. char-set:printing is
+# the union of char-set:whitespace and char-set:graphic.
+
+sub printing {
+    my($codepoint, $name, $category, $uppercase, $lowercase)= @_;
+    if (whitespace($codepoint, $name, $category, $uppercase, $lowercase)
+        || graphic($codepoint, $name, $category, $uppercase, $lowercase)) {
+        return 1;
+    } else {
+        return 0;
+    }
+}
+
+# The ISO control characters are the Unicode/Latin-1 characters in the
+# ranges [U+0000,U+001F] and [U+007F,U+009F].
+
+sub iso_control {
+    my($codepoint, $name, $category, $uppercase, $lowercase)= @_;
+    if (($codepoint >= 0x00 && $codepoint <= 0x1F)
+        || ($codepoint >= 0x7F && $codepoint <= 0x9F)) {
+        return 1;
+    } else {
+        return 0;
+    }
+}
+
+# A punctuation character is any character that has one of the
+# punctuation categories in the Unicode character database (Pc, Pd,
+# Ps, Pe, Pi, Pf, or Po.)
+
+# Note that srfi-14 gives conflicting requirements!!  It claims that
+# only the Unicode punctuation is necessary, but, explicitly calls out
+# the soft hyphen character (U+00AD) as punctution.  Current versions
+# of Unicode consider U+00AD to be a formatting character, not
+# punctuation.
+
+sub punctuation {
+    my($codepoint, $name, $category, $uppercase, $lowercase)= @_;
+    if ($category =~ (/P/)) {
+        return 1;
+    } else {
+        return 0;
+    }
+}
+        
+# A symbol is any character that has one of the symbol categories in
+# the Unicode character database (Sm, Sc, Sk, or So).
+
+sub symbol {
+    my($codepoint, $name, $category, $uppercase, $lowercase)= @_;
+    if ($category =~ (/S/)) {
+        return 1;
+    } else {
+        return 0;
+    }
+}
+        
+# Blank chars are horizontal whitespace.  A blank character is either
+#    * a character with the space separator category (Zs) in the
+#      Unicode character database.
+#    * U+0009 Horizontal tabulation (\t control-I) 
+sub blank {
+    my($codepoint, $name, $category, $uppercase, $lowercase)= @_;
+    if ($category =~ (/Zs/)
+        || $codepoint == 0x9) { 
+        return 1;
+    } else {
+        return 0;
+    }
+}
+
+# ASCII
+sub ascii {
+    my($codepoint, $name, $category, $uppercase, $lowercase)= @_;
+    if ($codepoint <= 0x7F) {
+        return 1;
+    } else {
+        return 0;
+    }
+}
+
+# Empty
+sub empty {
+    my($codepoint, $name, $category, $uppercase, $lowercase)= @_;
+    return 0;
+}
+
+# Full -- All characters.  
+sub full {
+    my($codepoint, $name, $category, $uppercase, $lowercase)= @_;
+    return 1;
+}
+
+
+# The procedure generates the two C structures necessary to describe a
+# given category.
+sub compute {
+    my($f) = @_;
+    my $start = -1;
+    my $end = -1;
+    my $len = 0;
+    my @rstart = (-1);
+    my @rend = (-1);
+
+    seek($in, 0, 0) or die "Can't seek to beginning of file: $!";
+
+    print "$f\n";
+
+    while (<$in>) {
+        # Parse the 14 column, semicolon-delimited UnicodeData.txt
+        # file
+        chomp;
+        my(@fields) = split(/;/);
+
+        # The codepoint: an integer
+        my $codepoint = hex($fields[0]); 
+
+        # If this is a character range, the last character in this
+        # range
+        my $codepoint_end = $codepoint;  
+
+        # The name of the character
+        my $name = $fields[1];    
+
+        # A two-character category code, such as Ll (lower-case
+        # letter)
+        my $category = $fields[2];       
+
+        # The codepoint of the uppercase version of this char
+        my $uppercase = $fields[12];   
+
+        # The codepoint of the lowercase version of this char
+        my $lowercase = $fields[13];    
+
+        my $pass = &$f($codepoint,$name,$category,$uppercase,$lowercase);
+        if ($pass == 1) {
+
+            # Some pairs of lines in UnicodeData.txt delimit ranges of
+            # characters.
+            if ($name =~ /First/) {
+                $line = <$in>;
+                die $! if $!;
+                $codepoint_end = hex( (split(/;/, $line))[0] );
+            }                 
+
+            # Compute ranges of characters [start:end] that meet the
+            # criteria.  Store the ranges.
+            if ($start == -1) {
+                $start = $codepoint;
+                $end = $codepoint_end;
+            } elsif ($end + 1 == $codepoint) {
+                $end = $codepoint_end;
+            } else {
+                $rstart[$len] = $start;
+                $rend[$len] = $end;
+                $len++;
+                $start = $codepoint;
+                $end = $codepoint_end;
+            }
+        }
+    }
+
+    # Extra logic to ensure that the last range is included
+    if ($start != -1) {
+        if ($len > 0 && address@hidden != $start) {
+            $rstart[$len] = $start;
+            $rend[$len] = $end;
+            $len++;
+        } elsif ($len == 0) {
+            $rstart[0] = $start;
+            $rend[0] = $end;
+        }
+    }
+
+    # Print the C struct that contains the range list.
+    print $out "scm_t_char_range cs_" . $f . "_ranges[] = {\n";
+    if ($rstart[0] != -1) {
+        for (my $i=0; $i<@rstart; $i++) {
+            printf $out "  {0x%04x, 0x%04x},\n", $rstart[$i], $rend[$i];
+        }
+    }
+    print $out "};\n\n";
+
+    # Print the C struct that contains the range list length and
+    # pointer to the range list.
+    print $out "scm_t_char_set cs_${f} = {\n";
+    print $out "  $len,\n";
+    print $out "  cs_" . $f . "_ranges\n";
+    print $out "};\n\n";
+}
+
+# Write a bit of a header
+print $out "/* srfi-14.i.c -- standard SRFI-14 character set data */\n\n";
+print $out "/* This file is #include'd by srfi-14.c.  */\n\n";
+print $out "/* This file was generated from 
http://unicode.org/Public/UNIDATA/UnicodeData.txt\n";;
+print $out "   with the unidata_to_charset.pl script.  */\n\n";
+
+# Write the C structs for each SRFI-14 charset
+compute "lower_case";
+compute "upper_case";
+compute "title_case";
+compute "letter";
+compute "digit";
+compute "hex_digit";
+compute "letter_plus_digit";
+compute "graphic";
+compute "whitespace";
+compute "printing";
+compute "iso_control";
+compute "punctuation";
+compute "symbol";
+compute "blank";
+compute "ascii";
+compute "empty";
+compute "full";
+
+close $in;
+close $out;
+
+# And we're done.
+
+
+
+
+
+
diff --git a/libguile/vm-i-scheme.c b/libguile/vm-i-scheme.c
index 5de39a2..42f8bac 100644
--- a/libguile/vm-i-scheme.c
+++ b/libguile/vm-i-scheme.c
@@ -281,7 +281,7 @@ VM_DEFINE_INSTRUCTION (108, slot_set, "slot-set", 0, 3, 0)
 
 VM_DEFINE_FUNCTION (109, vector_ref, "vector-ref", 2)
 {
-  long i;
+  long i = 0;
   ARGS2 (vect, idx);
   if (SCM_LIKELY (SCM_I_IS_VECTOR (vect)
                   && SCM_I_INUMP (idx)
@@ -294,7 +294,7 @@ VM_DEFINE_FUNCTION (109, vector_ref, "vector-ref", 2)
 
 VM_DEFINE_INSTRUCTION (110, vector_set, "vector-set", 0, 3, 0)
 {
-  long i;
+  long i = 0;
   SCM vect, idx, val;
   POP (val); POP (idx); POP (vect);
   if (SCM_LIKELY (SCM_I_IS_VECTOR (vect)
@@ -346,12 +346,12 @@ BV_REF_WITH_ENDIANNESS (f64, ieee_double)
 
 #define BV_FIXABLE_INT_REF(stem, fn_stem, type, size)                   \
 {                                                                       \
-  long i;                                                               \
+  long i = 0;                                                           \
   ARGS2 (bv, idx);                                                      \
   VM_VALIDATE_BYTEVECTOR (bv);                                          \
   if (SCM_LIKELY (SCM_I_INUMP (idx)                                     \
                   && ((i = SCM_I_INUM (idx)) >= 0)                        \
-                  && (i < SCM_BYTEVECTOR_LENGTH (bv))                   \
+                  && (i + size <= SCM_BYTEVECTOR_LENGTH (bv))           \
                   && (i % size == 0)))                                  \
     RETURN (SCM_I_MAKINUM (*(scm_t_##type*)                             \
                            (SCM_BYTEVECTOR_CONTENTS (bv) + i)));        \
@@ -361,12 +361,12 @@ BV_REF_WITH_ENDIANNESS (f64, ieee_double)
 
 #define BV_INT_REF(stem, type, size)                                    \
 {                                                                       \
-  long i;                                                               \
+  long i = 0;                                                           \
   ARGS2 (bv, idx);                                                      \
   VM_VALIDATE_BYTEVECTOR (bv);                                          \
   if (SCM_LIKELY (SCM_I_INUMP (idx)                                     \
-                  && ((i = SCM_I_INUM (idx)) >= 0)                        \
-                  && (i < SCM_BYTEVECTOR_LENGTH (bv))                   \
+                  && ((i = SCM_I_INUM (idx)) >= 0)                      \
+                  && (i + size <= SCM_BYTEVECTOR_LENGTH (bv))           \
                   && (i % size == 0)))                                  \
     { scm_t_##type x = (*(scm_t_##type*)(SCM_BYTEVECTOR_CONTENTS (bv) + i)); \
       if (SCM_FIXABLE (x))                                              \
@@ -380,12 +380,12 @@ BV_REF_WITH_ENDIANNESS (f64, ieee_double)
 
 #define BV_FLOAT_REF(stem, fn_stem, type, size)                         \
 {                                                                       \
-  long i;                                                               \
+  long i = 0;                                                           \
   ARGS2 (bv, idx);                                                      \
   VM_VALIDATE_BYTEVECTOR (bv);                                          \
   if (SCM_LIKELY (SCM_I_INUMP (idx)                                     \
                   && ((i = SCM_I_INUM (idx)) >= 0)                        \
-                  && (i < SCM_BYTEVECTOR_LENGTH (bv))                   \
+                  && (i + size <= SCM_BYTEVECTOR_LENGTH (bv))           \
                   && (i % size == 0)))                                  \
     RETURN (scm_from_double ((*(type*)(SCM_BYTEVECTOR_CONTENTS (bv) + i)))); \
   else                                                                  \
@@ -454,12 +454,12 @@ BV_SET_WITH_ENDIANNESS (f64, ieee_double)
 
 #define BV_FIXABLE_INT_SET(stem, fn_stem, type, min, max, size)         \
 {                                                                       \
-  long i, j;                                                            \
+  long i = 0, j = 0;                                                    \
   SCM bv, idx, val; POP (val); POP (idx); POP (bv);                     \
   VM_VALIDATE_BYTEVECTOR (bv);                                          \
   if (SCM_LIKELY (SCM_I_INUMP (idx)                                     \
                   && ((i = SCM_I_INUM (idx)) >= 0)                      \
-                  && (i < SCM_BYTEVECTOR_LENGTH (bv))                   \
+                  && (i + size <= SCM_BYTEVECTOR_LENGTH (bv))           \
                   && (i % size == 0)                                    \
                   && (SCM_I_INUMP (val))                                \
                   && ((j = SCM_I_INUM (val)) >= min)                    \
@@ -472,12 +472,12 @@ BV_SET_WITH_ENDIANNESS (f64, ieee_double)
 
 #define BV_INT_SET(stem, type, size)                                    \
 {                                                                       \
-  long i;                                                               \
+  long i = 0;                                                           \
   SCM bv, idx, val; POP (val); POP (idx); POP (bv);                     \
   VM_VALIDATE_BYTEVECTOR (bv);                                          \
   if (SCM_LIKELY (SCM_I_INUMP (idx)                                     \
                   && ((i = SCM_I_INUM (idx)) >= 0)                      \
-                  && (i < SCM_BYTEVECTOR_LENGTH (bv))                   \
+                  && (i + size <= SCM_BYTEVECTOR_LENGTH (bv))           \
                   && (i % size == 0)))                                  \
     *(scm_t_##type*) (SCM_BYTEVECTOR_CONTENTS (bv) + i) = scm_to_##type (val); 
\
   else                                                                  \
@@ -487,12 +487,12 @@ BV_SET_WITH_ENDIANNESS (f64, ieee_double)
 
 #define BV_FLOAT_SET(stem, fn_stem, type, size)                         \
 {                                                                       \
-  long i;                                                               \
+  long i = 0;                                                           \
   SCM bv, idx, val; POP (val); POP (idx); POP (bv);                     \
   VM_VALIDATE_BYTEVECTOR (bv);                                          \
   if (SCM_LIKELY (SCM_I_INUMP (idx)                                     \
                   && ((i = SCM_I_INUM (idx)) >= 0)                      \
-                  && (i < SCM_BYTEVECTOR_LENGTH (bv))                   \
+                  && (i + size <= SCM_BYTEVECTOR_LENGTH (bv))           \
                   && (i % size == 0)))                                  \
     *(type*) (SCM_BYTEVECTOR_CONTENTS (bv) + i) = scm_to_double (val);  \
   else                                                                  \
diff --git a/libguile/vm.c b/libguile/vm.c
index 514ff8d..f753ea2 100644
--- a/libguile/vm.c
+++ b/libguile/vm.c
@@ -227,21 +227,41 @@ static SCM make_u8vector (const scm_t_uint8 *bytes, 
size_t len)
   return scm_take_u8vector (new_bytes, len);
 }
 
+/* Dummy structure to guarantee 32-bit alignment.  */
+struct t_32bit_aligned
+{
+  scm_t_int32 dummy;
+  scm_t_uint8 bytes[18];
+};
+
 static SCM
 really_make_boot_program (long nargs)
 {
-  scm_byte_t bytes[] = {0, 0, 0, 0,
-                        0, 0, 0, 0,
-                        0, 0, 0, 0,
-                        scm_op_mv_call, 0, 0, 1, scm_op_make_int8_1, 
scm_op_halt};
+  SCM u8vec;
+  struct t_32bit_aligned bytes =
+    {
+      .dummy = 0,
+      .bytes = { 0, 0, 0, 0,
+                0, 0, 0, 0,
+                0, 0, 0, 0,
+                scm_op_mv_call, 0, 0, 1,
+                scm_op_make_int8_1, scm_op_halt }
+    };
+
   SCM ret;
-  ((scm_t_uint32*)bytes)[1] = 6; /* set len in current endianness, no meta */
+
+  /* Set length in current endianness, no meta.  */
+  ((scm_t_uint32 *) bytes.bytes)[1] = 6;
+
   if (SCM_UNLIKELY (nargs > 255 || nargs < 0))
     abort ();
-  bytes[13] = (scm_byte_t)nargs;
-  ret = scm_make_program (scm_bytecode_to_objcode (make_u8vector (bytes, 
sizeof(bytes))),
+  bytes.bytes[13] = (scm_byte_t) nargs;
+
+  u8vec = make_u8vector (bytes.bytes, sizeof (bytes.bytes));
+  ret = scm_make_program (scm_bytecode_to_objcode (u8vec),
                           SCM_BOOL_F, SCM_EOL);
   SCM_SET_SMOB_FLAGS (ret, SCM_F_PROGRAM_IS_BOOT);
+
   return ret;
 }
 #define NUM_BOOT_PROGS 8
diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4
index aad4999..7f64af2 100644
--- a/m4/gnulib-cache.m4
+++ b/m4/gnulib-cache.m4
@@ -15,7 +15,7 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 
--doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl --libtool 
--macro-prefix=gl --no-vc-files alloca-opt autobuild byteswap canonicalize-lgpl 
count-one-bits environ extensions flock fpieee full-read full-write havelib 
iconv_open-utf lib-symbol-visibility libunistring putenv stdlib strcase 
strftime striconveh string vsnprintf
+#   gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 
--doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl --libtool 
--macro-prefix=gl --no-vc-files alloca-opt autobuild byteswap canonicalize-lgpl 
count-one-bits environ extensions flock fpieee full-read full-write havelib 
iconv_open-utf lib-symbol-visibility libunistring putenv stdlib strcase 
strftime striconveh string verify vsnprintf
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([])
@@ -41,6 +41,7 @@ gl_MODULES([
   strftime
   striconveh
   string
+  verify
   vsnprintf
 ])
 gl_AVOID([])
diff --git a/module/language/assembly/compile-bytecode.scm 
b/module/language/assembly/compile-bytecode.scm
index 73ed620..4b9f7b7 100644
--- a/module/language/assembly/compile-bytecode.scm
+++ b/module/language/assembly/compile-bytecode.scm
@@ -110,6 +110,9 @@
                                (set! i (1+ i))
                                (if (> i 0) (write-byte x))))
                       (get-addr (lambda () i)))
+               ;; FIXME: We should add padding here so that META's bytecode
+               ;; meets the alignment requirements of `scm_objcode'.  See
+               ;; `scm_c_make_objcode_slice ()'.
                (write-bytecode meta write get-addr '()))))
         ((load-unsigned-integer ,str) (write-loader str))
         ((load-integer ,str) (write-loader str))
diff --git a/module/system/base/compile.scm b/module/system/base/compile.scm
index 22f8e04..7e26609 100644
--- a/module/system/base/compile.scm
+++ b/module/system/base/compile.scm
@@ -2,20 +2,19 @@
 
 ;; Copyright (C) 2001, 2009 Free Software Foundation, Inc.
 
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;; 
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-;; 
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING.  If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;;; This library is free software; you can redistribute it and/or
+;;; modify it under the terms of the GNU Lesser General Public
+;;; License as published by the Free Software Foundation; either
+;;; version 3 of the License, or (at your option) any later version.
+;;;
+;;; This library is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;;; Lesser General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU Lesser General Public
+;;; License along with this library; if not, write to the Free Software
+;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA
 
 ;;; Code:
 
diff --git a/module/system/base/syntax.scm b/module/system/base/syntax.scm
index d968bdf..cc73f38 100644
--- a/module/system/base/syntax.scm
+++ b/module/system/base/syntax.scm
@@ -2,20 +2,19 @@
 
 ;; Copyright (C) 2001 Free Software Foundation, Inc
 
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING.  If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA
+;;; This library is free software; you can redistribute it and/or
+;;; modify it under the terms of the GNU Lesser General Public
+;;; License as published by the Free Software Foundation; either
+;;; version 3 of the License, or (at your option) any later version.
+;;;
+;;; This library is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;;; Lesser General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU Lesser General Public
+;;; License along with this library; if not, write to the Free Software
+;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA
 
 ;;; Code:
 
diff --git a/module/system/repl/common.scm b/module/system/repl/common.scm
index 1978255..2db4518 100644
--- a/module/system/repl/common.scm
+++ b/module/system/repl/common.scm
@@ -2,20 +2,19 @@
 
 ;; Copyright (C) 2001 Free Software Foundation, Inc.
 
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;; 
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-;; 
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING.  If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;;; This library is free software; you can redistribute it and/or
+;;; modify it under the terms of the GNU Lesser General Public
+;;; License as published by the Free Software Foundation; either
+;;; version 3 of the License, or (at your option) any later version.
+;;;
+;;; This library is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;;; Lesser General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU Lesser General Public
+;;; License along with this library; if not, write to the Free Software
+;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA
 
 ;;; Code:
 
diff --git a/module/system/repl/describe.scm b/module/system/repl/describe.scm
index 0563def..590d223 100644
--- a/module/system/repl/describe.scm
+++ b/module/system/repl/describe.scm
@@ -2,20 +2,19 @@
 
 ;; Copyright (C) 2001 Free Software Foundation, Inc.
 
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;; 
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-;; 
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING.  If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;;; This library is free software; you can redistribute it and/or
+;;; modify it under the terms of the GNU Lesser General Public
+;;; License as published by the Free Software Foundation; either
+;;; version 3 of the License, or (at your option) any later version.
+;;;
+;;; This library is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;;; Lesser General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU Lesser General Public
+;;; License along with this library; if not, write to the Free Software
+;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA
 
 ;;; Code:
 
diff --git a/module/system/vm/instruction.scm b/module/system/vm/instruction.scm
index 3ad718e..403e9cd 100644
--- a/module/system/vm/instruction.scm
+++ b/module/system/vm/instruction.scm
@@ -2,20 +2,19 @@
 
 ;; Copyright (C) 2001 Free Software Foundation, Inc.
 
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;; 
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-;; 
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING.  If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;;; This library is free software; you can redistribute it and/or
+;;; modify it under the terms of the GNU Lesser General Public
+;;; License as published by the Free Software Foundation; either
+;;; version 3 of the License, or (at your option) any later version.
+;;;
+;;; This library is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;;; Lesser General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU Lesser General Public
+;;; License along with this library; if not, write to the Free Software
+;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA
 
 ;;; Code:
 
diff --git a/module/system/vm/objcode.scm b/module/system/vm/objcode.scm
index ab6bb4b..7c0490d 100644
--- a/module/system/vm/objcode.scm
+++ b/module/system/vm/objcode.scm
@@ -2,20 +2,19 @@
 
 ;; Copyright (C) 2001 Free Software Foundation, Inc.
 
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;; 
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-;; 
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING.  If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;;; This library is free software; you can redistribute it and/or
+;;; modify it under the terms of the GNU Lesser General Public
+;;; License as published by the Free Software Foundation; either
+;;; version 3 of the License, or (at your option) any later version.
+;;;
+;;; This library is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;;; Lesser General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU Lesser General Public
+;;; License along with this library; if not, write to the Free Software
+;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA
 
 ;;; Code:
 
diff --git a/module/system/vm/profile.scm b/module/system/vm/profile.scm
index 2c17fc7..6ab418a 100644
--- a/module/system/vm/profile.scm
+++ b/module/system/vm/profile.scm
@@ -2,20 +2,19 @@
 
 ;; Copyright (C) 2001 Free Software Foundation, Inc.
 
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;; 
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-;; 
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING.  If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;;; This library is free software; you can redistribute it and/or
+;;; modify it under the terms of the GNU Lesser General Public
+;;; License as published by the Free Software Foundation; either
+;;; version 3 of the License, or (at your option) any later version.
+;;;
+;;; This library is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;;; Lesser General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU Lesser General Public
+;;; License along with this library; if not, write to the Free Software
+;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA
 
 ;;; Code:
 
diff --git a/module/system/vm/program.scm b/module/system/vm/program.scm
index 5a490b9..9db4a75 100644
--- a/module/system/vm/program.scm
+++ b/module/system/vm/program.scm
@@ -1,21 +1,20 @@
 ;;; Guile VM program functions
 
 ;;; Copyright (C) 2001 Free Software Foundation, Inc.
-;;; Copyright (C) 2005 Ludovic Courtès  <address@hidden>
 ;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 2 of the License, or
-;;; (at your option) any later version.
+;;; This library is free software; you can redistribute it and/or
+;;; modify it under the terms of the GNU Lesser General Public
+;;; License as published by the Free Software Foundation; either
+;;; version 3 of the License, or (at your option) any later version.
 ;;;
-;;; This program is distributed in the hope that it will be useful,
+;;; This library is distributed in the hope that it will be useful,
 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;;; GNU General Public License for more details.
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;;; Lesser General Public License for more details.
 ;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+;;; You should have received a copy of the GNU Lesser General Public
+;;; License along with this library; if not, write to the Free Software
+;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA
 
 ;;; Code:
 
diff --git a/module/system/vm/trace.scm b/module/system/vm/trace.scm
index 2ba5280..6ff09a7 100644
--- a/module/system/vm/trace.scm
+++ b/module/system/vm/trace.scm
@@ -2,20 +2,19 @@
 
 ;; Copyright (C) 2001 Free Software Foundation, Inc.
 
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;; 
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-;; 
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING.  If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;;; This library is free software; you can redistribute it and/or
+;;; modify it under the terms of the GNU Lesser General Public
+;;; License as published by the Free Software Foundation; either
+;;; version 3 of the License, or (at your option) any later version.
+;;;
+;;; This library is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;;; Lesser General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU Lesser General Public
+;;; License along with this library; if not, write to the Free Software
+;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA
 
 ;;; Code:
 
diff --git a/test-suite/tests/asm-to-bytecode.test 
b/test-suite/tests/asm-to-bytecode.test
index 1c2a599..01ba846 100644
--- a/test-suite/tests/asm-to-bytecode.test
+++ b/test-suite/tests/asm-to-bytecode.test
@@ -15,6 +15,7 @@
 ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA
 
 (define-module (test-suite tests asm-to-bytecode)
+  #:use-module (rnrs bytevector)
   #:use-module (test-suite lib)
   #:use-module (system vm instruction)
   #:use-module (language assembly compile-bytecode))
@@ -45,6 +46,14 @@
               (lambda ()
                 (equal? v y)))))
 
+(define (u32->u8-list x)
+  ;; Return a 4 uint8 list corresponding to the host's native representation
+  ;; of X, a uint32.
+  (let ((bv (make-bytevector 4)))
+    (bytevector-u32-native-set! bv 0 x)
+    (bytevector->u8-list bv)))
+
+
 (with-test-prefix "compiler"
   (with-test-prefix "asm-to-bytecode"
 
@@ -75,22 +84,30 @@
     (comp-test '(load-keyword "qux")
                (vector 'load-keyword 0 0 3 (char->integer #\q) (char->integer 
#\u)
                        (char->integer #\x)))
-    
-    ;; fixme: little-endian test.
+
     (comp-test '(load-program 3 2 1 0 () 3 #f (make-int8 3) (return))
-               (vector 'load-program 3 2 1 0 3 0 0 0 0 0 0 0
-                       (instruction->opcode 'make-int8) 3
-                       (instruction->opcode 'return)))
+               (list->vector
+                `(load-program
+                  3 2 1 0            ;; nargs, nrest, nlocs, nexts
+                  ,@(u32->u8-list 3) ;; len
+                  ,@(u32->u8-list 0) ;; metalen
+                  make-int8 3
+                  return)))
 
-    ;; fixme: little-endian test.
     (comp-test '(load-program 3 2 1 0 () 3
                               (load-program 3 2 1 0 () 3
                                             #f
                                             (make-int8 3) (return))
                               (make-int8 3) (return))
-               (vector 'load-program 3 2 1 0 3 0 0 0 (+ 3 12) 0 0 0
-                       (instruction->opcode 'make-int8) 3
-                       (instruction->opcode 'return)
-                       3 2 1 0 3 0 0 0 0 0 0 0
-                       (instruction->opcode 'make-int8) 3
-                       (instruction->opcode 'return)))))
+               (list->vector
+                `(load-program
+                  3 2 1 0                   ;; nargs, nrest, nlocs, nexts
+                  ,@(u32->u8-list 3)        ;; len
+                  ,@(u32->u8-list (+ 3 12)) ;; metalen
+                  make-int8 3
+                  return
+                  3 2 1 0                   ;; nargs, nrest, nlocs, nexts
+                  ,@(u32->u8-list 3)        ;; len
+                  ,@(u32->u8-list 0)        ;; metalen
+                  make-int8 3
+                  return)))))
diff --git a/testsuite/run-vm-tests.scm b/testsuite/run-vm-tests.scm
index c6c7a5d..f7eba40 100644
--- a/testsuite/run-vm-tests.scm
+++ b/testsuite/run-vm-tests.scm
@@ -1,7 +1,6 @@
 ;;; run-vm-tests.scm -- Run Guile-VM's test suite.
 ;;;
-;;; Copyright 2005  Ludovic Courtès <address@hidden>
-;;;
+;;; Copyright 2005, 2009 Free Software Foundation, Inc.
 ;;;
 ;;; This program is free software; you can redistribute it and/or
 ;;; modify it under the terms of the GNU Lesser General Public License
@@ -85,9 +84,7 @@ equal in the sense of @var{equal?}."
         (failed (length (filter not res))))
 
     (if (= 0 failed)
-       (begin
-         (format #t "~%All ~a tests passed~%" total)
-         (exit 0))
+        (exit 0)
        (begin
          (format #t "~%~a tests failed out of ~a~%"
                  failed total)


hooks/post-receive
-- 
GNU Guile




reply via email to

[Prev in Thread] Current Thread [Next in Thread]