[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: scm_i_* in Snd
From: |
Ludovic Courtès |
Subject: |
Re: scm_i_* in Snd |
Date: |
Wed, 04 Jun 2008 09:27:34 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Hi,
Han-Wen Nienhuys <address@hidden> writes:
> Ludovic Courtès escreveu:
>>> That's great, but what if I need to get a "raw" string contents,
>>> that is a string of bytes as it is?
>>
>> "Raw string contents" is undefined, as Clinton said. I could be
>> whatever internal representation Guile chooses.
>
> Please explain what the canonical representation for a byte array
> is. Are we expected to do all our 8-bit data manipulations on uniform
> vectors or similar?
I'm not sure I understand your question.
As suggested earlier, strings are *not* "byte arrays". In the future,
we will (hopefully) support Unicode, and we'll have to choose one or
several internal representations, which we do not want to expose so as
to keep freedom precisely about what implementation strategy and string
representation we choose.
The manual reads this:
Right now, Guile simply equates Scheme characters and bytes, ignoring
the possibility of multi-byte encodings completely. This will change
in the future, where Guile will use Unicode codepoints as its
characters and UTF-8 or some other encoding as its internal encoding.
When you exclusively use the functions listed in this section, you are
`future-proof'.
http://www.gnu.org/software/guile/manual/html_node/Conversion-to_002ffrom-C.html
Thanks,
Ludovic.
Re: scm_i_* in Snd, Kjetil S. Matheussen, 2008/06/03