Hello, Clinton Ebadi <clin...@unknownlamer.org> writes:
> The `scm_{to|from}_locale_string' functions provide enough abstraction > to make this doable without breaking anything that doesn't use > `scm_take_locale_string' (and even then Guile can detect when the locale > is not UCS-4, revert to `scm_from_locale_string' and `free' the taken > string immediately after conversion). This could be enhanced with > `scm_{to|from}_encoded_string ({char*|SCM} string, enum encoding)' > functions. Yes. > Basically `make-string' would be extended with an :internal-encoding > argument, or a new `make-string-with-internal-encoding' (with a better > name perhaps) introduced to explicitly specify the internal encoding > the application desires. I think the internal encoding of strings should not be exposed to applications, at least not at the Scheme level. Nevertheless, one could argue that it might be useful to expose it at the C level, precisely to allow the efficient interaction with C code, but that would need to be done with care, so that Guile is not over-constrained. Thanks, Ludo'.