Q – Rainer Schwarzbach’s Text Utilities
Project description
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
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
Built Distribution
File details
Details for the file qrstu-0.3.1.tar.gz
.
File metadata
- Download URL: qrstu-0.3.1.tar.gz
- Upload date:
- Size: 36.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c6a889cbae84ef5445363cc3928d7c0265ae3dbdc8b5f915392ad7b9267afea |
|
MD5 | e9aaaf3ac834188274600db78ea57f7d |
|
BLAKE2b-256 | d7f6a7ab7bc093b058393a649c83a43f164dc6e9b80bdc7e0e63b96ff6dff694 |
Provenance
File details
Details for the file qrstu-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: qrstu-0.3.1-py3-none-any.whl
- Upload date:
- Size: 31.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a771d4c40754582f87133ed096f56a27323959e271f6ca3e6c203057cbb984c |
|
MD5 | 98c7994497073ce17c25d9fa116e60a6 |
|
BLAKE2b-256 | c1c1db285973534ff9a3c4756b9f3cb0489ce2b122c056cbc1d859be588cefaa |