handle unknown characters gracefully