encode does no work if it thinks it's already utf-8 (even if invalid)

Also use duck typing for whether we should use encode