This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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.

Release History

Release History

This version
History Node

0.2

History Node

0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pymbfl-0.2.tar.gz (22.0 kB) Copy SHA256 Checksum SHA256 Source Jun 25, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting