-
Notifications
You must be signed in to change notification settings - Fork 111
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
Enforce UTF-8 encoding for input bytes #115
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once the benchmarks will be removed, I'll merge the PR 👍
srt_test.go
Outdated
assert.Error(t, err) | ||
} | ||
|
||
func BenchmarkOpenSRT(b *testing.B) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove this benchmark?
webvtt_test.go
Outdated
@@ -227,3 +233,11 @@ func TestWebVTTTags(t *testing.T) { | |||
Text with a <00:06:30.000>timestamp in the middle | |||
`, b.String()) | |||
} | |||
|
|||
func BenchmarkOpenWebVTT(b *testing.B) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove this benchmark?
Cool, removed. Thanks @asticode! |
Thanks for the PR! ❤️ Let me know whether you need a tag 👍 |
@asticode A tag would be great thanks! |
FYI I've created a |
As discussed in #114, it would be better if we tried not to read bytes in other encoding if possible, as the parsers will become confused since they are generally using strings from a go source file (UTF-8) to compare against the input bytes which may or may not be UTF-8.