Skip to content

Commit

Permalink
修复 windows下载歌词的编码问题 #36
Browse files Browse the repository at this point in the history
  • Loading branch information
0xHJK committed Nov 18, 2019
1 parent 201179e commit 3e89978
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion music_dl/song.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def _download_file(self, url, outfile, stream=False):
self.logger.error(e)

def _save_lyrics_text(self):
with open(self.lyrics_fullname, "w") as f:
with open(self.lyrics_fullname, "w", encoding="utf-8") as f:
f.write(self.lyrics_text)
click.echo(
_(" :: Saved to: {outfile}").format(
Expand Down

0 comments on commit 3e89978

Please sign in to comment.