We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在 /demo/static-server/util/file.js 里面有这样的一段代码 :
/demo/static-server/util/file.js
let content = fs.readFileSync(filePath, 'binary' )
其实,这里需要对文件类型进行判断的,因为中文使用 binary 读取出来会是乱码的。个人觉得只有是图片、视频等才有必要使用 binary 读取。其他的用 utf8 便可。
binary
utf8
The text was updated successfully, but these errors were encountered:
No branches or pull requests
在
/demo/static-server/util/file.js
里面有这样的一段代码 :其实,这里需要对文件类型进行判断的,因为中文使用
binary
读取出来会是乱码的。个人觉得只有是图片、视频等才有必要使用binary
读取。其他的用utf8
便可。The text was updated successfully, but these errors were encountered: