trim control characters like \r in words in classencode