summaryrefslogtreecommitdiff
path: root/alpine/mailcmd.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2019-07-31 22:42:33 -0600
committerEduardo Chappa <chappa@washington.edu>2019-07-31 22:42:33 -0600
commitc81d2e8c36f45764436db4fd44cbae2b0ba9c9e0 (patch)
tree9799309ec48664b81210dca9f0d08499cdde52e1 /alpine/mailcmd.c
parent695a1ff509ac66e8e0d9bd619b983dfb8b49c0dc (diff)
downloadalpine-c81d2e8c36f45764436db4fd44cbae2b0ba9c9e0.tar.xz
* PC-Alpine will always offer the UTF8 encoded name when an attachment
is being saved.
Diffstat (limited to 'alpine/mailcmd.c')
-rw-r--r--alpine/mailcmd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/alpine/mailcmd.c b/alpine/mailcmd.c
index 6ddd02af..204c3148 100644
--- a/alpine/mailcmd.c
+++ b/alpine/mailcmd.c
@@ -4286,12 +4286,18 @@ get_export_filename(struct pine *ps, char *filename, char *deefault,
rfc1522_decode_to_utf8((unsigned char *)tmp_20k_buf,
SIZEOF_20KBUF, filename);
+#ifndef _WINDOWS
+ /* In the Windows operating system we always return the UTF8 encoded name */
if(strcmp(tmp_20k_buf, filename)){
opts[i].ch = ctrl('N');
opts[i].rval = 40;
opts[i].name = "^N";
opts[i++].label = "Name UTF8";
}
+#else
+ strncpy(filename, tmp_20k_buf, len);
+ filename[len-1] = '\0';
+#endif /* _WINDOWS */
if(dir_hist || hist_len > 0){
opts[i].ch = ctrl('Y');
@@ -4840,6 +4846,7 @@ get_export_filename(struct pine *ps, char *filename, char *deefault,
Writechar(BELL, 0);
continue;
}
+#ifndef _WINDOWS
else if(r == 40){
rfc1522_decode_to_utf8((unsigned char *)tmp_20k_buf,
SIZEOF_20KBUF, filename);
@@ -4847,6 +4854,7 @@ get_export_filename(struct pine *ps, char *filename, char *deefault,
filename[len-1] = '\0';
continue;
}
+#endif /* _WINDOWS */
else if(r != 0){
Writechar(BELL, 0);
continue;