保存utf8格式歌词时添加bom

pull/1050/head
lyswhut 2022-11-03 18:49:02 +08:00
parent 5c4590d507
commit 8d87990793
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ export const saveLrc = async(filePath: string, lrc: string, format: LX.LyricForm
break
case 'utf8':
default:
fs.writeFile(filePath, lrc, 'utf8', err => {
fs.writeFile(filePath, iconv.encode(lrc, 'utf8', { addBOM: true }), 'utf8', err => {
if (err) console.log(err)
})
break