1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-13 23:20:32 +02:00
This commit is contained in:
Marius Vollmer 2004-08-10 15:58:57 +00:00
parent 44825fffb0
commit c88453e881

View file

@ -2325,9 +2325,9 @@ important.
In C, a string is just a sequence of bytes, and the character encoding In C, a string is just a sequence of bytes, and the character encoding
describes the relation between these bytes and the actual characters describes the relation between these bytes and the actual characters
that the string contains. For Scheme strings, character encoding not that make up the string. For Scheme strings, character encoding is
an issue (most of the time), since in Scheme you never get to see the not an issue (most of the time), since in Scheme you never get to see
bytes, only the characters. the bytes, only the characters.
Well, ideally, anyway. Right now, Guile simply equates Scheme Well, ideally, anyway. Right now, Guile simply equates Scheme
characters and bytes, ignoring the possibility of multi-byte encodings characters and bytes, ignoring the possibility of multi-byte encodings
@ -2336,10 +2336,11 @@ Unicode codepoints as its characters and UTF-8 (or maybe UCS-4) as its
internal encoding. When you exclusively use the functions listed in internal encoding. When you exclusively use the functions listed in
this section, you are `future-proof'. this section, you are `future-proof'.
Converting a Scheme string to a C string will allocate fresh memory to Converting a Scheme string to a C string will often allocate fresh
hold the result. You must take care that this memory is properly memory to hold the result. You must take care that this memory is
freed eventually. In many cases, this can be achieved by using properly freed eventually. In many cases, this can be achieved by
@code{scm_frame_free} inside an appropriate frame, @xref{Frames}. using @code{scm_frame_free} inside an appropriate frame,
@xref{Frames}.
@deftypefn {C Function} SCM scm_from_locale_string (const char *str) @deftypefn {C Function} SCM scm_from_locale_string (const char *str)
@deftypefnx {C Function} SCM scm_from_locale_stringn (const char *str, size_t len) @deftypefnx {C Function} SCM scm_from_locale_stringn (const char *str, size_t len)