consistent encoding