title: How to read non-ASCII lines from file with std::ifstream on Linux?
body: <p>I was trying to read a plain text file. In my case, I need to read line per line, and process that information. I know the C++ has wstuffs for reading wchars. I tried the following:</p>
  
  <pre><code>#include &lt;fstream&gt;
  #include &lt;iostream&gt;
  
  int main() {
      std::wfstream file("file");       // aaaàaaa
      std::wstring str;
      std::getline(file, str);
      std::wcout &lt;&lt; str &lt;&lt; std::endl;   // aaa
  }
  </code></pre>
  
  <p>But as you can see, it did not read a full line. It stops when reads "à", which is non-ASCII. How can I fix it?</p>