Greetings,
As had been noticed back in January, wmii no longer works on NetBSD (cf.
thread with subject `Snapshot release of 3.5 - Does not work!'). The
breakage was caused by the introduction of the native codeset -> UTF-8
translation. Specifically, the version of iconv_open(3) that ships with
NetBSD does not support the use of the empty string to denote the default
codeset[1]; it simply fails with an "unsupported codeset" error. However,
the return value of iconv_open wasn't being checked, and so iconv(3) was
subsequently being used with an invalid conversion descriptor. The effect
of this was random memory curruption, leading to unpredictable errors.
I've attached a patch that uses nl_langinfo(3) to obtain the current codeset.
This patch has been tested under Debian GNU/Linux 4.0 and NetBSD 4.0 running
on AMD-64 hardware.
Cheers,
-- Alex Plotnick
[1] The SUSv3 says:
Settings of fromcode and tocode and their permitted combinations are
implementation-dependent.
(http://www.opengroup.org/onlinepubs/009695399/functions/iconv_open.html)
So, NetBSD is perfectly within its right to not support a codeset called "".
Also, the man page for iconv_open(3) on Max OS X 10.4 says that it supports
"" as a designator for the default codeset, but I haven't tested it. Thus,
this patch may or may not solve the problems some people have experienced
recently running wmii on Mac OS X.
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:32:59 UTC