charset: Rewrote utf8_validate, and added four new functions: