debugging encoding issue