Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

使用json作为配置文件读取时,在微信小游戏中会默认使用ascii编码,无法读取 #50

Open
bq49 opened this issue Jul 19, 2018 · 1 comment

Comments

@bq49
Copy link

bq49 commented Jul 19, 2018

laya.wxmini.js 里61行:
MiniAdpter.getUrlEncode=function(url,type){
if(url.indexOf(".fnt")!=-1 )
return "utf8";
else if(type=="arraybuffer")
return "";
return "ascii";
}

得修改为:
MiniAdpter.getUrlEncode=function(url,type){
if(url.indexOf(".fnt")!=-1 || url.indexOf(".json")!=-1)
return "utf8";
else if(type=="arraybuffer")
return "";
return "ascii";
}

@aaronswiftming
Copy link

是的,这里要加入以utf-8编码读取,感谢您的回复

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants