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

Extended charset encoding detection options #2

Merged
merged 2 commits into from
Apr 15, 2016

Conversation

grunjol
Copy link
Contributor

@grunjol grunjol commented Apr 15, 2016

@finnp when i was trying to use your module to convert a file from srt to vtt I found your default limits to detect encoding (only use first line) was not enough because srt's first line is always 1 so the detection part was useless.

I added two options to improve encoding detection

  • newline Use input text until newline is reached to detect encoding (default true)

  • detectSize Maximum size from input to detect encoding (default 65535)

    as you can see the given defaults behaves exactly as your current implementation, making the changes backward compatible.

@grunjol
Copy link
Contributor Author

grunjol commented Apr 15, 2016

This PRs also fixes #1, if you pass a string as parameter is not handled as default encoding.

@finnp finnp merged commit 3e49e75 into finnp:master Apr 15, 2016
@finnp
Copy link
Owner

finnp commented Apr 15, 2016

Thank you for the fixes and additions! Are you interested to be a collaborator on this module?

@grunjol grunjol deleted the feature-charset-detect-options branch April 15, 2016 22:31
@finnp
Copy link
Owner

finnp commented Apr 15, 2016

Published as 1.2.0

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