Skip to main content

UTF-12 encoder

Project description

utf-12

UTF-12 encoder based on the tapemark article

Original tapemark article: https://tapemark.narod.ru/comp/utf12en.html

Following the specs, everything is in big-endian. Ensure that inputs are big-endian.

Encodes unicode characters 07c0-D7ff, e000-10ffff

Install

pip install utf12

Usage

from utf12 import encode, decode
encoded_bytes = encode("R2-D2")
print(decode(encoded_bytes))

encode(unicode_characters)

unicode_characters is a python string of unicode characters Returns a bytes object of the slabs with trailing 0 bits on the last byte if needed

decode(slabs)

slabs is a bytes object of the slabs for the characters Returns a python string of the unicode characters

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

utf12-1.0.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

utf12-1.0.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file utf12-1.0.0.tar.gz.

File metadata

  • Download URL: utf12-1.0.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for utf12-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d5f4cb33d30b8ba9d19434616a03aae5798465cbbdda39cae5245be0ce835367
MD5 d2fc93f6dd507eb6416ece4278a068af
BLAKE2b-256 bcd997bbfdd1fbb2a9c66a093092930479f5e270e4ffa8b786caab1c203dce0a

See more details on using hashes here.

File details

Details for the file utf12-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: utf12-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for utf12-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 daeb41fcaf765615c17c89e23100a58ade05ae30cf37e8515ea178105ae25e7e
MD5 f8b775f2c0a7a01fd45e03d3ae185494
BLAKE2b-256 7d817b7c48ff4924a84a5e4369d0e6a2bbd07579d0cc899c733a202c775c2993

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