debug, convert encoding