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

❇️ Improvement over Vietnamese detection #126

Merged
merged 2 commits into from Oct 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions charset_normalizer/md.py
Expand Up @@ -453,6 +453,12 @@ def is_suspiciously_successive_range(
if "Emoticons" in unicode_range_a or "Emoticons" in unicode_range_b:
return False

# Latin characters can be accompanied with a combining diacritical mark
# eg. Vietnamese.
if "Latin" in unicode_range_a or "Latin" in unicode_range_b:
if "Combining" in unicode_range_a or "Combining" in unicode_range_b:
return False

keywords_range_a, keywords_range_b = unicode_range_a.split(
" "
), unicode_range_b.split(" ")
Expand Down