diff --git a/edit/edit.c b/edit/edit.c index 1becc41bf..bb9fc29f0 100644 --- a/edit/edit.c +++ b/edit/edit.c @@ -564,6 +564,9 @@ edit_load_file (WEdit *edit) /* If fast load was used, the number of lines wasn't calculated */ edit->total_lines = edit_count_lines (edit, 0, edit->last_byte); } else { +#ifdef HAVE_CHARSET + const char *codepage_id; +#endif edit->last_byte = 0; if (*edit->filename) { edit->stack_disable = 1; @@ -573,6 +576,11 @@ edit_load_file (WEdit *edit) } edit->stack_disable = 0; } +#ifdef HAVE_CHARSET + codepage_id = get_codepage_id( source_codepage ); + if ( codepage_id ) + edit->utf8 = str_isutf8 ( codepage_id ); +#endif } return 0; }