Skip to main content

Python library and CLI for validating UTF-8 text

Project description

validate-utf8

PyPI License

Python library and CLI for validating UTF-8 text.

Install it like this:

pip3 install validate-utf8

The command-line tool works like this:

$ validate-utf8 20081104__wv__general__mason__precinct.csv
invalid continuation byte
Mason,28 COURTHOUSE-GROUND FLOORá,,,REP,Straight Ticket,15
                                ^
invalid continuation byte
Mason,28 COURTHOUSE-GROUND FLOORá,,,DEM,Straight Ticket,21
                                ^

Use it as a library like this:

from validate_utf8 import find_utf8_errors

errrors = find_utf8_errors(bytestring):
if not errors:
    print("It is valid")
else:
    print(errors)

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

validate_utf8-0.1-py3-none-any.whl (7.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page