>>>> "GE" == Gunnar Evermann
<ge204(a)eng.cam.ac.uk> writes:
GE> Ben Wing <ben(a)666.com> writes:
> GETTEXT is a no-op currently, and in any case would not be
gettext(), but our
> own version referencing our own tables and using internal format.
GE> Oh, of course, sorry.
GE> The bug report I was looking at referred to a crash in our error()
GE> function in a LANG=de_DE environment. Obviously the string _passed_ to
GE> error contained the non-ASCII characters.
GE> for example, what about this code in fileio.c:
GE> error ("IO error reading %s: %s",
GE> XSTRING_DATA (filename), strerror (saverrno));
GE> now surely *this* is wrong or am I missing something again?
Yes. the first argument is in the internal encoding, the second in an
external one. Crash. An audit would look at all the strerror calls in
the code.
Check out lisp_strerror
Lisp_Object
lisp_strerror (int errnum)
{
return build_ext_string (strerror (errnum), Qnative);
}
Probably an invention of mine. You can't quite replace calls to
strerror with calls to lisp_strerror, but it's a good idea.
Martin