【发布时间】:2019-03-22 14:52:20
【问题描述】:
我有以下代码:
const notifications = await axios.get(url)
const ctype = notifications.headers["content-type"];
ctype 接收 "text/json; charset=iso-8859-1"
我的字符串是这样的:“'Ol� Matheus, est� pendente.'”,
如何从 iso-8859-1 解码为 utf-8 而不会出现这些错误?
谢谢
【问题讨论】:
标签: node.js utf-8 character-encoding axios iso-8859-1