Shouldn't it be `set_encoding(it, encoding)`? Or maybe we just don't need `encoding` argument at all.