Skip to main content

Detect whether the terminal supports advanced Unicode.

Project description

> is-unicode-supported

Detect whether the terminal supports advanced Unicode.

Checks if terminal supports advanced Unicode (CJK, emoji, etc.) by measuring the cursor position of a single, wide char (𠀀). On Windows, returns False for legacy consoles (CMD). On all other modern terminals, returns True if the wide char renders as 2 columns.

⚡ Installation

pip install is-unicode-supported

💻 Command line usage

is-unicode-supported  # or isunicodesupported
# e.g. => True

CLI options:

Option Description
-h, --help Show help screen
-v, --version Show version
--docs Open docs URL

🔌 API usage

import is_unicode_supported

if is_unicode_supported():
    print('Advanced Unicode supported!')
else:
    print('Advanced Unicode not supported!')

Note: Most type checkers will falsely warn is_unicode_supported is not a callable module because they are incapable of analyzing runtime behavior (where the module is replaced w/ a function for cleaner, direct access). You can safely suppress such warnings using # type: ignore.

MIT License

Copyright © 2026 Adam Lui.

Related

🇪🇸 latin-locales - ISO 639-1 (2-letter) codes for Latin locales.
🇨🇳 non-latin-locales - ISO 639-1 (2-letter) codes for non-Latin locales.
🌍 translate-messages - Translate en/messages.json (chrome.i18n format) to 100+ locales automatically.

Back to top ↑

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

is_unicode_supported-1.0.1.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

is_unicode_supported-1.0.1-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file is_unicode_supported-1.0.1.tar.gz.

File metadata

  • Download URL: is_unicode_supported-1.0.1.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for is_unicode_supported-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f282829c355a6cb3701cf6f2852573647207a5f9282ba767cc3b0fbae924bcf0
MD5 6af08196f48340bea258a8f90536c308
BLAKE2b-256 2e32d5ba2eb55218b6c511269e7afc77e6d53a9038fe5f70a8f57a7b57af9140

See more details on using hashes here.

File details

Details for the file is_unicode_supported-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for is_unicode_supported-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 780000081546808f80fc21914857a9f6b4ec04d9a07ebd283ed0e5a781574c5e
MD5 b4e37509442b842553834ca6b287518d
BLAKE2b-256 d0bc1e188f1f2dc89fe5ca3498431bd2d4613dd4db1c2de7a0e9ff59dc51a1c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page