about summary refs log tree commit diff stats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/msgviewer.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go
index 9d71c3e..6de729e 100644
--- a/widgets/msgviewer.go
+++ b/widgets/msgviewer.go
@@ -319,6 +319,9 @@ func (ps *PartSwitcher) Draw(ctx *ui.Context) {
 			strings.ToLower(part.part.MIMESubType))
 		if filename, ok := part.part.DispositionParams["filename"]; ok {
 			name += fmt.Sprintf(" (%s)", filename)
+		} else if filename, ok := part.part.Params["name"]; ok {
+			// workaround golang not supporting RFC2231 besides ASCII and UTF8
+			name += fmt.Sprintf(" (%s)", filename)
 		}
 		ctx.Printf(len(part.index)*2, y+i, style, "%s", name)
 	}