cpd: fix #1144 CPD encoding argument has no effect
Thanks to Peter Bruin