Bruce Korb <bk...@gnu.org> writes: > On 01/07/12 08:13, Mark H Weaver wrote: >>> Most of the strings that I wind up altering are created with a >>> scm_from_locale_string() C function call. >> >> BTW, beware that scm_from_locale_string() is only appropriate for >> strings that came from the user (e.g. command-line arguments, reading >> from a port, etc). When converting string literals from your own source >> code, you should use scm_from_latin1_string() or scm_from_utf8_string(). >> >> Similarly, to make symbols from C string literals, use >> scm_from_latin1_symbol() or scm_from_utf8_symbol(). >> >> Caveat: these functions did not exist in Guile 1.8. If your C string >> literals are ASCII-only, I guess it won't matter in practice which >> function you use, although it would be good to spread the understanding >> that C string literals should not be interpreted according to the user's >> locale. > > I go back to my argument that a facilitation language needs to focus > on being as helpful as possible. That means doing what is likely > wanted instead of throwing errors at every possibility. It also means > not changing interfaces.
Undefined behavior is not an interface. -- David Kastrup