I wanted a c function that could analyze a byte stream to see if it was UTF-8 compliant.  In the end I found it easier to write my own