rename encoding to the_type