https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209617
--- Comment #2 from j...@iki.fi ---
Right, it was not wctomb() at all that was in fault.
The reason for the misbehavior was...
loc = newlocale (LC_CTYPE_MASK, "fi_FI.UTF-8", LC_GLOBAL_LOCALE);
Other xlocale manual pages mention LC_GLOBAL_L
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209617
--- Comment #1 from j...@iki.fi ---
Though the problem was originally found on amd64 it seems
that the same thing happens also on ppc.
When wctomb() misbehaves the exact same manner on two hardware
types with different byte orders and differ
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209617
Bug ID: 209617
Summary: wctomb() is completely broken when UTF-8 locales are
used
Product: Base System
Version: 10.3-RELEASE
Hardware: Any
OS: Any