add some encoding enforcement