Use encoding argument in recursive_encoding