Optimized utf8 decoder