+ *temp1 = _nc_render(win, wch);
+ win->_curx++;
+ }
+ } else if (iscntrl(ch8)) {
+ s = NCURSES_SP_NAME(unctrl) (NCURSES_SP_ARGx (chtype) ch8);
+ while (*s != '\0') {
+ code = _nc_insert_ch(sp, win, ChAttrOf(ch) | UChar(*s));
+ if (code != OK)
+ break;
+ ++s;
+ }
+ }
+#if USE_WIDEC_SUPPORT
+ else {
+ /*
+ * Handle multibyte characters here
+ */
+ SetChar2(wch, ch);
+ wch = _nc_render(win, wch);
+ count = _nc_build_wch(win, &wch);
+ if (count > 0) {
+ code = _nc_insert_wch(win, &wch);
+ } else if (count == -1) {
+ /* handle EILSEQ */
+ s = NCURSES_SP_NAME(unctrl) (NCURSES_SP_ARGx (chtype) ch8);
+ if (strlen(s) > 1) {
+ while (*s != '\0') {
+ code = _nc_insert_ch(sp, win,
+ ChAttrOf(ch) | UChar(*s));
+ if (code != OK)
+ break;
+ ++s;
+ }
+ } else {
+ code = ERR;
+ }
+ }