Skip to content

simonw/validate-utf8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Python library and CLI for validating UTF-8 text

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages