Skip to content
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

SubtitleParser acceptable encodings? #170

Closed
Calvin-Xu opened this issue Jul 18, 2023 · 2 comments
Closed

SubtitleParser acceptable encodings? #170

Calvin-Xu opened this issue Jul 18, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@Calvin-Xu
Copy link
Contributor

I had a subtitle file in UTF-16 LE (SRT), and the parser fails immediately at the leading position (SRT Parser: Invalid position "��1"). Since mpv accepts subtitles in this encoding with no problem, maybe this can be addressed?

Also, may I suggest also printing the line number where it encounters an error in addition to printing the line out to help the user locate and fix the subtitle file?

@ripose-jp ripose-jp added the bug Something isn't working label Jul 18, 2023
@ripose-jp
Copy link
Owner

Could you link me to an SRT file that does this?

Also, may I suggest also printing the line number where it encounters an error in addition to printing the line out to help the user locate and fix the subtitle file?

This probably won't be difficult, but I'll have to check when I fix this.

@Calvin-Xu
Copy link
Contributor Author

Calvin-Xu commented Jul 18, 2023

This one does it on latest built of master.

Patlabor_the_Movie_2_(1993)[720p,BluRay,x264]-_THORA.txt

This probably won't be difficult, but I'll have to check when I fix this.

Thanks. I just added a counter for tracking down this issue. Should not be too bad.

ripose-jp added a commit that referenced this issue Jul 18, 2023
This requires keeping track of the line number in a seperate variable.

Addresses #170
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants