Metadata-Version: 2.1
Name: validate-utf8
Version: 0.1
Summary: Python library and CLI for validating UTF-8 text
Home-page: https://github.com/simonw/validate-utf8
Author: Simon Willison
License: Apache License, Version 2.0
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/markdown
Requires-Dist: click
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'

# validate-utf8

[![PyPI](https://img.shields.io/pypi/v/validate-utf8.svg)](https://pypi.org/project/validate-utf8/)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/validate-utf8/blob/master/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)


