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

Improved Encoding Detection #82

Merged
merged 5 commits into from
Jan 20, 2024

Conversation

thttg
Copy link
Contributor

@thttg thttg commented Jan 19, 2024

More nuanced logic that considers additional scenarios and combinations of encoding detections.

@thttg thttg marked this pull request as draft January 19, 2024 16:56
@thttg thttg marked this pull request as ready for review January 19, 2024 23:44
@AmyrAhmady
Copy link
Member

For all of these three:

chardetng_encoding
chardet_encoding
charset_normalizer_encoding

they're only used in their lowercase version. so make them lowercase at the very top when you are applied detection to these variables, instead of calling to_lowercase() all the time, to make code execution faster and readable

@thttg
Copy link
Contributor Author

thttg commented Jan 20, 2024

For all of these three:

chardetng_encoding
chardet_encoding
charset_normalizer_encoding

they're only used in their lowercase version. so make them lowercase at the very top when you are applied detection to these variables, instead of calling to_lowercase() all the time, to make code execution faster and readable

Fixed.

@AmyrAhmady AmyrAhmady merged commit 63277a8 into openmultiplayer:master Jan 20, 2024
2 checks passed
@thttg thttg deleted the optimize-detection branch January 21, 2024 01:59
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.

None yet

2 participants