guile-devel
[Top][All Lists]
Advanced

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

Re: Wide strings


From: Ludovic Courtès
Subject: Re: Wide strings
Date: Tue, 27 Jan 2009 19:59:50 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

Hi!

Mike Gran <address@hidden> writes:

> Gnulib works for me.  Bruno is the maintainer of those funcs, so I'm
> sure they work great.

Good!

> So really the first questions to answer are the encoding question and
> whether the R6RS string API is the goal.  

SRFI-1[34] (i.e., status quo in terms of supported APIs) seems like a
reasonable milestone.

> For the former, I rather like the idea that internally a string will
> internally be encoded either as 4-byte chars of UTF-32 or 1-byte chars
> of ISO-8859-1.  Since the first 256 chars of UTF-32 are ISO-8859-1, it
> makes it trivial for string-ref/set to work with codepoints.

Good to know.  That would give us O(1) ref/set!, and with Latin-1
special-cased, we'd have memory saving when interpreting Latin-1 code,
which is good.

> (Though, such a scheme would force scm_take_locale_string to become
> scm_take_iso88591_string.)

I think it would not *become* scm_take_iso88591_string, but
scm_take_iso88591_string (and others, as Andy suggested) would
*complement* it.

Thanks,
Ludo'.





reply via email to

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