title: scanf() doesn't accept whitespace
body: <p>I need a scanf() call to accept whitespace (no tabs or newlines, just <code>' '</code> space glyphs).</p>
  
  <pre><code>char buffer[2048];
  scanf(" %2048[0-9a-zA-Z ]s", buffer);
  </code></pre>
  
  <p>This format specifier I got from the answer to this question:</p>
  
  <p><a href="https://stackoverflow.com/questions/1247989/how-do-you-allow-spaces-to-be-entered-using-scanf">how-do-you-allow-spaces-to-be-entered-using-scanf</a></p>
  
  <p>While it accepts the first sequence of input just fine, it terminates where the first whitespace character is, with a null character.  What's going on?  Am I perhaps using the wrong format?</p>
  
  <p>I should say, I'm using scanf() here because safety isn't a concern; I'm the only person who'll ever use this particular program, and the input is rigidly formatted.  </p>