stop stripping EOL characters from segment data

Add a check for invalid control set characters in element values