Skip to main content

Q – Rainer Schwarzbach’s Text Utilities

Test conversion and transcoding utilities

Installation from PyPI

pip install qrstu

Installation in a virtual environment is strongly recommended.

Usage

guess

The guess module can be used to automatically detect and repair encoding errors (duplicate UTF-8 encoding of an already UTF-8 encoded text by misreading the bytes as another 8-bit encoding, eg. 'äöü'), but as the name says, it mostly works on the basis of an educated guess.

reduce

The reduce module can be used to reduce Unicode text in Latin script to ASCII encodable Unicode text, similar to Unidecode but taking a different approach (ie. mostly wrapping functionality from the standard library module unicodedata). Unlike Unidecode which also transliterates characters from non-Latin scripts, reduce stubbornly refuses to handle these.

You can, however, specify an optional errors= argument in the reduce.reduce_text() call, which is passed to the internally used codecs.encode() function, thus taking advance of the codecs module errors handling.

transcode

The transcode module provides various functions for decoding and encoding byte sequences to/from Unicode text.

Further reading

Please see the documentation at https://blackstream-x.gitlab.io/qrstu for detailed usage information.

If you found a bug or have a feature suggestion, please open an issue here

Metadata

Release files for qrstu 0.3.1

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

Source distribution (sdist)

Source distribution for qrstu 0.3.1
File Size Uploaded
qrstu-0.3.1.tar.gz 36.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for qrstu 0.3.1
File Interpreter ABI Platform
qrstu-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 68.0 kB

Release files / qrstu-0.3.1.tar.gz

Download URL qrstu-0.3.1.tar.gz
Size 36.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5c6a889cbae84ef5445363cc3928d7c0265ae3dbdc8b5f915392ad7b9267afea
BLAKE2b-256 checksum
How to use checksums
d7f6a7ab7bc093b058393a649c83a43f164dc6e9b80bdc7e0e63b96ff6dff694
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / qrstu-0.3.1-py3-none-any.whl

Download URL qrstu-0.3.1-py3-none-any.whl
Size 31.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a771d4c40754582f87133ed096f56a27323959e271f6ca3e6c203057cbb984c
BLAKE2b-256 checksum
How to use checksums
c1c1db285973534ff9a3c4756b9f3cb0489ce2b122c056cbc1d859be588cefaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.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