Added tests, fixed isUTF8.