我在chrome dev工具中使用fetch native。 在response.json()中,接收到作业的数据,但是非正式字符的位数正确显示。
chrome的网络标签在响应正文中正确显示字符。
我试图设置不同的内容类型标头, UTF-8和ISO-8891-1。
怎么可能。我看到chrome的工具如何正确显示角色?
答案 0 :(得分:1)
我终于解决了它,我使用了原生的xhr.overrideMimeType("application/json;charset=iso-8859-1");
和这个原生函数
# Guava 20.0
-dontwarn com.google.errorprone.annotations.CanIgnoreReturnValue
-dontwarn com.google.errorprone.annotations.concurrent.LazyInit
-dontwarn com.google.errorprone.annotations.ForOverride
我从这里拿走了: