summaryrefslogtreecommitdiff
path: root/alpine/mailcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'alpine/mailcmd.c')
-rw-r--r--alpine/mailcmd.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/alpine/mailcmd.c b/alpine/mailcmd.c
index 4d519897..5e95d334 100644
--- a/alpine/mailcmd.c
+++ b/alpine/mailcmd.c
@@ -4233,9 +4233,6 @@ get_export_filename(struct pine *ps, char *filename, char *deefault,
pos = hist_len + items_in_hist(dir_hist);
- if(dir_hist == NULL)
- init_hist(&dir_hist, HISTSIZE);
-
if(flags & GE_ALLPARTS || history || dir_hist){
/*
* Copy the opts and add one to the end of the list.
@@ -4282,6 +4279,15 @@ get_export_filename(struct pine *ps, char *filename, char *deefault,
opts[i++].label = N_("Binary");
}
+ rfc1522_decode_to_utf8((unsigned char *)tmp_20k_buf,
+ SIZEOF_20KBUF, filename);
+ if(strcmp(tmp_20k_buf, filename)){
+ opts[i].ch = ctrl('N');
+ opts[i].rval = 40;
+ opts[i].name = "^N";
+ opts[i++].label = "Name UTF8";
+ }
+
if(dir_hist || hist_len > 0){
opts[i].ch = ctrl('Y');
opts[i].rval = 32;
@@ -4827,6 +4833,13 @@ get_export_filename(struct pine *ps, char *filename, char *deefault,
Writechar(BELL, 0);
continue;
}
+ else if(r == 40){
+ rfc1522_decode_to_utf8((unsigned char *)tmp_20k_buf,
+ SIZEOF_20KBUF, filename);
+ strncpy(filename, tmp_20k_buf, len);
+ filename[len-1] = '\0';
+ continue;
+ }
else if(r != 0){
Writechar(BELL, 0);
continue;