update charset and encode to utf-8