node-imap
node-imap copied to clipboard
the attachment filename is messy code
trafficstars
when I use fetch function to get the attachment , and find the attachment filename is messy code. here is the log of attributes.struct
{
struct: [
{
type: "mixed",
params: {
boundary: "----=_Part_2334289_269021430.1647946847692",
},
disposition: null,
language: null,
},
[
{
partID: "1",
type: "text",
subtype: "html",
params: {
charset: "GBK",
},
id: null,
description: null,
encoding: "QUOTED-PRINTABLE",
size: 3043,
lines: 59,
md5: null,
disposition: null,
language: null,
},
],
[
{
partID: "2",
type: "application",
subtype: "octet-stream",
params: {
name: "������ֵ���ֹ��㡿\r\n SJH578_���氲ӯ���6��˽ļ֤ȯͶ�ʻ���_2022-03-21.xlsx",
},
id: null,
description: null,
encoding: "BASE64",
size: 9446,
md5: null,
disposition: {
type: "attachment",
params: {
filename: "������ֵ���ֹ��㡿\r\n SJH578_���氲ӯ���6��˽ļ֤ȯͶ�ʻ���_2022-03-21.xlsx",
},
},
language: null,
},
],
]
}
Looks like you are missing utf-8 support.