我有以下代码:
const notifications = await axios.get(url)
const ctype = notifications.headers["content-type"];
Run Code Online (Sandbox Code Playgroud)
ctype 接收“text/json; charset=iso-8859-1”
我的字符串是这样的:“'Ol?Matheus,est?pendente。',”
如何从 iso-8859-1 解码到 utf-8 而不会出现这些错误?
谢谢