Modified UTF-8 decoder in api_utils and utf8_utils to ignore invalid characters.