title: Reading ASCII text file using an std::ifstream in C++
body: <p>I have an Arabic file (ASCII), which contains:
  121101  الزبون كمال 
  121102  الزبون سعيد 
  121103  الزبون عمار </p>
  
  <p>I want to read this file using an std::ifstream in C++ as:</p>
  
  <pre><code>std::ifstream ifs(file.GetFileName());
  std::string content((std::istreambuf_iterator&lt;char&gt;(ifs)), std::istreambuf_iterator&lt;char&gt;());
  </code></pre>
  
  <p>When I had watched  a content variable using VS IDE, I got a character encoding error:
  121101  ÇáÒÈæä ßãÇá
  121102  ÇáÒÈæä ÓÚíÏ
  121103  ÇáÒÈæä ÚãÇÑ</p>
  
  <p>Also I have tray an std::wifstream:</p>
  
  <pre><code>std::wifstream ifs2(file.GetFileName());
  std::string content2((std::istreambuf_iterator&lt;wchar_t&gt;(ifs2)), std::istreambuf_iterator&lt;wchar_t&gt;());
  </code></pre>
  
  <p>I have got the same error.
  Could anybody help me?
  Thank.</p>