+#ifdef MULTIBYTE_SUPPORT
+ while ((char_len = mbtowc(&wide_char, s, nbytes)) > 0 && *start < end) {
+ if (!iswcntrl(wide_char) && !iswspace(wide_char)) {
+ strncpy(*start, s, char_len);
+ s += char_len;
+ *start += char_len;
+ nbytes -= char_len;
+ } else {
+ while ((char_len = mbtowc(&wide_char, s, nbytes)) > 0 && (iswcntrl(wide_char) || iswspace(wide_char))) {
+ s += char_len;
+ nbytes -= char_len;
+ }
+ *(*start)++ = ' ';
+ }
+ }
+#else
+ while((c = (unsigned char) *s++) && *start < end) {
+ if (!iscntrl(c) && !isspace(c)) {