Python libmbfl bindings
Project description
pymbfl provides Python bindings for libmbfl. libmbfl is used to determine encoding of the files; it tries to guess the right encoding depending on the list of the encodings which user wants to check.
Typical pymbfl usage:
>> import pymbfl # Collect information about encoding >> encoding = pymbfl.Encoding("ascii") >> bool(encoding.flags & pymbfl.MBCS) False >> encoding.mime 'US-ASCII' >> encoding.aliases ['ANSI_X3.4-1968', 'iso-ir-6', 'ANSI_X3.4-1986', 'ISO_646.irv:1991', 'US-ASCII', 'ISO646-US', 'us', 'IBM367', 'IBM-367', 'cp367', 'csASCII'] # Determine possible encoding >> language = "ru" >> encodings = ["UTF-8", "UTF-16", "UTF-32LE"] >> detector = pymbfl.Detector(language, encodings) >> detector.detect(data, strict) # enable/disable strict check and detect
See docs/pymbfl.html file for more detailed description.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pymbfl-0.2.tar.gz
(22.0 kB
view details)
File details
Details for the file pymbfl-0.2.tar.gz
.
File metadata
- Download URL: pymbfl-0.2.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
84a4e6cbdda4ea65824c06a50f2625ba005b1a24d9eafcf853023b26f8c3e7af
|
|
MD5 |
a046468438cc93552a7964404719e518
|
|
BLAKE2b-256 |
2d4373728d7519fdd025a2cab4b96fd5790ddaaf6bbc86a8dc06ca524fff0639
|