Skip to main content

Python library to check for problematic Unicode code points.

Project description

RFC9839

PyPI - Version Coveralls License

Python library to check for problematic Unicode code points.

Port of Go library of the same name.

Based on the Unicode code-point subsets specified in RFC9839.

Usage

from rfc9839 import unicode_scalar, xml_character, unicode_assignable

code_point = 0xFDDA # ARABIC LIGATURE SAD WITH MEEM WITH ALEF MAKSURA FINAL FORM

print(unicode_scalar.is_valid_code_point(code_point)) # True
print(xml_character.is_valid_code_point(code_point)) # True
print(unicode_assignable.is_valid_code_point(code_point)) # False


print(unicode_assignable.is_valid_string(chr(code_point))) # False
print(xml_character.is_valid_utf8(chr(code_point).encode("utf-8"))) # True

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

rfc9839-0.0.1.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

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

rfc9839-0.0.1-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file rfc9839-0.0.1.tar.gz.

File metadata

  • Download URL: rfc9839-0.0.1.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rfc9839-0.0.1.tar.gz
Algorithm Hash digest
SHA256 dfea668a18a762604bee7b2157a0ef808cedfda0a2aef4a8a920437c75a22315
MD5 916da1873b45ffcb8f050659ed9c40cb
BLAKE2b-256 988d79b68134fe5749a69615ebad6fbecbf8370ade3358c034538ce2393fd8e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for rfc9839-0.0.1.tar.gz:

Publisher: release.yml on elliotwutingfeng/rfc9839

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rfc9839-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: rfc9839-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rfc9839-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 580c65230b5a50109d83644ee8093b77ffeb1883dc5d8f5b4b0807014c1a8502
MD5 2b791307fc490eb1472395f78d2e4648
BLAKE2b-256 2d58363671b946c3aad385dbc321272ad71b3a7436ce5844f0f4ea344995d68e

See more details on using hashes here.

Provenance

The following attestation bundles were made for rfc9839-0.0.1-py3-none-any.whl:

Publisher: release.yml on elliotwutingfeng/rfc9839

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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