Skip to content

修复了ass.py在Windows上默认为GBK的错误,增加了一点改动 #916

New issue

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

STHUDY
Copy link

@STHUDY STHUDY commented Apr 11, 2025

我发在Windows在获取歌词的时候可能会遇到编码问题,并增加了一些内容

仅仅修改了ass.py

    1. 为make_ass_file_subtitle增加了一个参数,可以选择字幕的文本格式,并支持lrc、srt、json等格式
  • image
  • image
    1. 修复了Windows平台默认GBK编码导致的报错UnicodeEncodeError: 'gbk' codec can't encode character '\u266a' in position 32: illegal multibyte sequence

@Nemo2011
Copy link
Owner

首先麻烦改一下 pr 的分支 (into Nemo2011:dev)

然后关于功能方面,gbk 相关问题可以的话也许能换一种解决方式,把原来的文件名参数改成一个 SupportsWrite[str]out_format 参数保留,顺便再拆一个返回 str 的函数。(有点像 json.dump() json.dumps() 的设计了)

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

Successfully merging this pull request may close these issues.

2 participants