Improved utf8 parser