An updated version to correct the bug of UTF-8 decoder.