Handle encoding before doing work, also force known coding before re-encode