title: Why does the print command in gdb return \035 for C++ std::strings?
body: <p>Say I have the code:</p>
  
  <pre><code>std::string str = "random";
  
  function(str);
  
  void function (std::string str)
  {
    std::cout &lt;&lt; str &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>If I step through this code in gdb and then go into the function and do <code>p str</code> it would print out something like this <code>\362\241</code> but the cout will print to the screen the correct string <code>random</code>.  Has anyone seen this before if so what should I do?  Am I using the print command wrong in gdb or does it have something to do with how the compiler interprets the string?</p>