mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
add in core viewer codepage selection from list
This commit is contained in:
parent
38c7e229d5
commit
dbce157307
@ -3653,12 +3653,13 @@ static void view_cmk_moveto_bottom (void *w, int n) {
|
||||
static void
|
||||
view_select_encoding (WView *view)
|
||||
{
|
||||
char *enc;
|
||||
char *enc = NULL;
|
||||
GIConv conv;
|
||||
struct cache_line *line;
|
||||
|
||||
enc = input_dialog ("Encoding", "Paste encoding", NULL, "");
|
||||
do_select_codepage ();
|
||||
|
||||
enc = g_strdup( get_codepage_id ( source_codepage ) );
|
||||
if (enc != NULL) {
|
||||
conv = str_crt_conv_from (enc);
|
||||
if (conv != (iconv_t)(-1)) {
|
||||
@ -3668,7 +3669,9 @@ view_select_encoding (WView *view)
|
||||
line = view_offset_to_line (view, view->dpy_start);
|
||||
view_set_first_showed (view, line);
|
||||
}
|
||||
g_free(enc);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user