nodejs读取本地中文json文件出现乱码解决方法【点击查看详情】
nodejs读取本地中文json文件出现乱码解决方法:1. 确定json文件是UTF-8 无BOM编码的的。如果有BOM,会在读取第一行的时候出现乱码。 Per fs.readFileSync(filename, 'utf8') doesn't strip BOM markers #1918, fs.readFile is working as designed: BOM is
相关视频/文章