update encoding.