diff --git a/edit/edit.c b/edit/edit.c index 63f446c76..397eff18f 100644 --- a/edit/edit.c +++ b/edit/edit.c @@ -2385,6 +2385,7 @@ edit_execute_cmd (WEdit *edit, int command, int char_for_insertion) if (edit_get_byte (edit, edit->curs1) != '\n') edit_delete (edit); } +#ifdef HAVE_CHARSET if ( char_for_insertion > 255 && utf8_display == 0 ) { unsigned char str[6 + 1]; int res = g_unichar_to_utf8 (char_for_insertion, str); @@ -2401,8 +2402,11 @@ edit_execute_cmd (WEdit *edit, int command, int char_for_insertion) i++; } } else { +#endif edit_insert (edit, char_for_insertion); +#ifdef HAVE_CHARSET } +#endif if (option_auto_para_formatting) { format_paragraph (edit, 0); edit->force |= REDRAW_PAGE; diff --git a/edit/editdraw.c b/edit/editdraw.c index 2e0ccff2b..037dda521 100644 --- a/edit/editdraw.c +++ b/edit/editdraw.c @@ -484,16 +484,19 @@ edit_draw_this_line (WEdit *edit, long b, long row, long start_col, col += 2; break; } +#ifndef HAVE_CHARSET + int utf8_display = 0; +#endif if (!edit->utf8) { if ( ( utf8_display && g_unichar_isprint (c) ) || ( utf8_display == 0 && is_printable (c) ) ) { p->ch = c; p++; - } else { + } else { p->ch = '.'; p->style = MOD_ABNORMAL; p++; - } + } } else { if ( g_unichar_isprint (c) ) { p->ch = c;