debug encoding problem