Hi All. Note that MirBSD's libc is badly broken. Even when LC_ALL=C MB_CUR_MAX can be > 1. And perhaps other severe departures from reality.
There is code in gawk to deal with it - you can look at the gawk 4.1.3 tarball and various bits in the C code for LIBC_IS_BORKED (or some such). For the next major release (gawk's master branch, no timeframe yet) I removed all that code because it was exceedingly ugly and I think that Nelson is the only one in the world who attempts to build gawk on MirBSD. While this is admirable on his part, I finally decided that I didn't want the headache of maintaining those changes. So - Caveat Emptor; you may be twisting your code base for the benefit of just a single system that's WAAAY out in left field. My two cents worth. Thanks, Arnold