summaryrefslogtreecommitdiff
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
parent695a1ff509ac66e8e0d9bd619b983dfb8b49c0dc (diff)
downloadalpine-c81d2e8c36f45764436db4fd44cbae2b0ba9c9e0.tar.xz
* PC-Alpine will always offer the UTF8 encoded name when an attachment
is being saved.
-rw-r--r--alpine/mailcmd.c8
-rw-r--r--pith/pine.hlp6
2 files changed, 13 insertions, 1 deletions
diff --git a/alpine/mailcmd.c b/alpine/mailcmd.c
index 6ddd02a..204c314 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;
diff --git a/pith/pine.hlp b/pith/pine.hlp
index 1da108f..8ad4120 100644
--- a/pith/pine.hlp
+++ b/pith/pine.hlp
@@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any
reasonable place to be called from.
Dummy change to get revision in pine.hlp
============= h_revision =================
-Alpine Commit 360 2019-07-19 11:23:24
+Alpine Commit 361 2019-07-31 22:42:27
============= h_news =================
<HTML>
<HEAD>
@@ -242,6 +242,10 @@ submitted in 2009, but resubmitted by Erich Eckner on 2019.
<LI> Do not use a delay when printing messages to screen when the initial
keystroke sequence of commands is active. Based on a report from Holger
Trapp.
+
+<LI> In PC-Alpine, when the decoded name of an attachment does not agree
+ with its encoded name, Alpine will offer to save the file using the
+ UTF8 encoded name.
</UL>
<P>