[Ecls-list] Important changes
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at googlemail.com
Sat Feb 7 23:13:05 UTC 2009
On Sun, Feb 8, 2009 at 12:00 AM, Gabriel Dos Reis
<gdr at integrable-solutions.net> wrote:
> I have a question: Does the Unicode support somehow affects
> the mapping of Lisp types to C types in the FFI? For example,
> when passing a :cstring, does one have to specify the format/encoding?
Currently ECL assumes that strings are in the right encoding and
performs no transformation. :cstring is just a pointer to a list of
characters, retrieved from a lisp object of type (ARRAY BASE-CHAR (*))
This assumption may be incorrect: the C library may use an encoding
different from LATIN-1 or ISO-8859-1, which is what ECL imposes for
strings made of BASE-CHAR (unsigned char in C notation)
What I would like to do in the near future is to evolve from
string-input/output-streams to something more like
sequence-input/output-stream. This would inmediately add recoding
capabilities that could be used for the FFI.
However, what I would like to avoid is that (ARRAY BASE-CHAR (*)) has
a user defined encoding. That would complicate a lot the conversion
between these strings of type (ARRAY CHARACTER (*)), making the
outcome depend on locales, etc, etc.
I do not know whether this answers your question.
Juanjo
--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28009 (Spain)
http://juanjose.garciaripoll.googlepages.com
More information about the ecl-devel
mailing list