Skip to main content

Description

On April 1st 2005, IEEE released the RFC4042UTF-9 and UTF-18 Efficient Transformation Formats of Unicode” :

The current representation formats for Unicode (UTF-7, UTF-8, UTF-16) are not storage and computation efficient on platforms that utilize the 9 bit nonet as a natural storage unit instead of the 8 bit octet.

Since there are not so many architecture that use 9 bit nonets as natural storage units and the release date was on April Fools’ Day, the beautiful UTF-9 was forgotten and no python implementation is available.

This python module is here to fill this gap! ;)

Usage

There are only two functions:

  • utf9encode(string): takes a string and returns a utf9-encoded version.

  • utf9decode(data): takes utf9-encoded data and returns the corresponding string.

Example

>>> import utf9
>>> encoded = utf9.utf9encode(u'ႹЄLᒪo, 🌍ǃ')
>>> print repr(encoded)
'p\xe0\xb7-\x0c!1\xc3\x92\xd5\x1b\xc5\x82\x07n\x83x\xed\xdecX\xf80'
>>> print utf9.utf9decode(encoded)
ႹЄLᒪo, 🌍ǃ

Download files

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

Source Distribution

utf9-0.3.1.tar.gz (2.1 kB view details)

Uploaded Source

File details

Details for the file utf9-0.3.1.tar.gz.

File metadata

  • Download URL: utf9-0.3.1.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for utf9-0.3.1.tar.gz
Algorithm Hash digest
SHA256 222c012513649dacb9c531523636c8ee26bf1445c80fb238d4e76ae1ed7e0eea
MD5 d285475d70b7279cf42a18eabd7baa4d
BLAKE2b-256 ab968daca49a5a0f1f3d71dee8e70776e5ab41124a8481e3f54ab47e12b71538

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.1 This release

1 file

0.3

0.2

1 file

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