diff --git a/src/winio.c b/src/winio.c index 55b954c5..115c34f7 100644 --- a/src/winio.c +++ b/src/winio.c @@ -2138,14 +2138,16 @@ void minibar(void) char *this_position = openfile->current->data + openfile->current_x; if (*this_position == '\0') - sprintf(hexadecimal, openfile->current->next ? "U+000A" : "------"); + sprintf(hexadecimal, openfile->current->next ? " 0x0A" : "------"); else if (*this_position == '\n') - sprintf(hexadecimal, "U+0000"); - else if ((unsigned char)*this_position > 0xC1 && + sprintf(hexadecimal, " 0x00"); +#ifdef ENABLE_UTF8 + else if ((unsigned char)*this_position > 0xC1 && using_utf8() && mbtowc(&widecode, this_position, MAXCHARLEN) >= 0) sprintf(hexadecimal, "U+%04X", widecode); +#endif else - sprintf(hexadecimal, "U+%04X", (unsigned char)*this_position); + sprintf(hexadecimal, " 0x%02X", (unsigned char)*this_position); mvwaddstr(bottomwin, 0, COLS - 23, hexadecimal); }