Skip to main content

confusable_homoglyphs [doc]

https://img.shields.io/travis/vhf/confusable_homoglyphs.svg https://img.shields.io/pypi/v/confusable_homoglyphs.svg Documentation Status

a homoglyph is one of two or more graphemes, characters, or glyphs with shapes that appear identical or very similar wikipedia:Homoglyph

Unicode homoglyphs can be a nuisance on the web. Your most popular client, AlaskaJazz, might be upset to be impersonated by a trickster who deliberately chose the username ΑlaskaJazz.

  • AlaskaJazz is single script: only Latin characters.

  • ΑlaskaJazz is mixed-script: the first character is a greek letter.

You might also want to avoid people being tricked into entering their password on www.microsоft.com or www.faϲebook.com instead of www.microsoft.com or www.facebook.com. Here is a utility to play with these confusable homoglyphs.

Not all mixed-script strings have to be ruled out though, you could only exclude mixed-script strings containing characters that might be confused with a character from some unicode blocks of your choosing.

  • Allo and ρττ are fine: single script.

  • AlloΓ is fine when our preferred script alias is ‘latin’: mixed script, but Γ is not confusable.

  • Alloρ is dangerous: mixed script and ρ could be confused with p.

This library is compatible Python 2 and Python 3.

API documentation

Is the data up to date?

Yep.

The unicode blocks aliases and names for each character are extracted from this file provided by the unicode consortium.

The matrix of which character can be confused with which other characters is built using this file provided by the unicode consortium.

This data is stored in two JSON files: categories.json and confusables.json. If you delete them, they will both be recreated by downloading and parsing the two abovementioned files and stored as JSON files again.

History

1.0.0 (2016)

Initial release.

Metadata

Release files for confusable-homoglyphs 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for confusable-homoglyphs 2.0.0
File Size Uploaded
confusable_homoglyphs-2.0.0.tar.gz 31.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for confusable-homoglyphs 2.0.0
File Interpreter ABI Platform
confusable_homoglyphs-2.0.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 41.5 kB

Release files / confusable_homoglyphs-2.0.0.tar.gz

Download URL confusable_homoglyphs-2.0.0.tar.gz
Size 31.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b3a456b545df4e553c681e2d306c5605ae33e4a1a41a8de81df75d416b4c168f
BLAKE2b-256 checksum
How to use checksums
5866e9237750f3683e9413e913f4271a3cdfd611f1262047eba2eff870d48191
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / confusable_homoglyphs-2.0.0-py2.py3-none-any.whl

Download URL confusable_homoglyphs-2.0.0-py2.py3-none-any.whl
Size 10.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
8186725491537939025f129228802f9e4e8495de045e4eddd77db2e3b11d3d3a
BLAKE2b-256 checksum
How to use checksums
c8cda4cc6ac38d556ff339c762c445b80cd1adc0c56369f3fed6b3992abba374
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

3.3.1

2 release files

3.3.0

2 release files

3.2.0

2 release files

3.1.1

2 release files

3.1.0

1 release file

3.0.0

2 release files

2.0.2

2 release files

2.0.1

2 release files

This release

2.0.0 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page