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

Enforce UTF-8 encoding for input bytes #115

Merged
merged 8 commits into from
Oct 8, 2024

Conversation

nakkamarra
Copy link
Contributor

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.

@nakkamarra nakkamarra marked this pull request as ready for review October 7, 2024 14:44
Copy link
Owner

@asticode asticode left a 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) {
Copy link
Owner

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) {
Copy link
Owner

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?

@nakkamarra
Copy link
Contributor Author

Once the benchmarks will be removed, I'll merge the PR 👍

Cool, removed. Thanks @asticode!

@asticode asticode merged commit 80e6dcf into asticode:master Oct 8, 2024
1 check passed
@asticode
Copy link
Owner

asticode commented Oct 8, 2024

Thanks for the PR! ❤️

Let me know whether you need a tag 👍

@nakkamarra
Copy link
Contributor Author

@asticode A tag would be great thanks!

@asticode
Copy link
Owner

asticode commented Oct 8, 2024

FYI I've created a v0.29.0 tag 👍

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