title: How to strip all non visible characters from a string, and keep special characters
body: <p>I know this seems like a duplicate, but I don't believe it is. It's entirely possible that what I'm dealing with is an encoding issue with my provided file format.</p>
  
  <p>Essentially I'm checking for common characters before hashmap insertion. I've got standard input hooked up like so:</p>
  
  <pre><code>while(getline(cin, current, ' '){}
  </code></pre>
  
  <p>it outputs properly if you just print what comes in to standard output, but I've got a wild issue where the letter A will always hash to the value of A, but is not considered an A. I know what you're thinking. Whitespace. Well I tried removing whitespace and tabs and spaces. but I think I'm missing some of the invisible characters. I even tried creating a set of acceptable characters and removing non-acceptable characters. Still no luck.</p>
  
  <p>What would be a foolproof way of removing all invisible characters from these input strings? Is that a built in function by chance? </p>