【发布时间】:2017-10-02 04:05:22
【问题描述】:
我在使用 utf8 和 quoted-printable 对电子邮件正文进行编码时遇到问题
bodyHtml = utf8.decode(quotedPrintable.decode(resData['body-html']));
在heroku日志中,它说
2017-05-04T05:49:54.312348+00:00 app[consumerWorker.1]:
/app/node_modules/utf8/utf8.js:194
2017-05-04T05:49:54.312360+00:00 app[consumerWorker.1]: throw
Error('Invalid UTF-8 detected');
2017-05-04T05:49:54.312362+00:00 app[consumerWorker.1]: ^
2017-05-04T05:49:54.312362+00:00 app[consumerWorker.1]:
2017-05-04T05:49:54.312363+00:00 app[consumerWorker.1]: Error: Invalid
UTF-8 detected
我创建了一个 runkit,https://runkit.com/kiranlm/590abc3746b5b70012ffd7f8
【问题讨论】:
标签: javascript node.js heroku utf-8 quoted-printable