debug encoding issues