[plt-scheme] v299 unicode -> (char *)
On Oct 25, Ron Stanonik wrote:
> [...] SCHEME_BYTE_STR_VAL might do it, but then I would need to
> convert from chars to bytes in scheme (I guess) before calling the
> extension?
That's the sane approach, at least IMO. Dealing with different
encodings can be complicated, so it's better to do it in Scheme, where
it's also easy to hide the extra step by wrapping your functions with
code that will do the conversion. The foreign interface does just
that -- at the C level there is only byte strings, and mzscheme's
UCF-4 strings, then the Scheme part provides a `_string' type that
will choose some string->bytes/... conversion.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!