title: Reading multi language text file in c#
body: <p>I have to read a text file which can contains char from following languages: English, Japanese, Chinese, French, Spanish, German, Italian</p>
  
  <p>My task is to simply read the data and write it to new text file (placing new line char <code>\n</code> after 100 chars).</p>
  
  <p>I cannot use  <code>File.ReadAllText</code> and  <code>File.ReadAllLines</code> as file size can be more than 500 MB. So I have written following code:</p>
  
  <pre><code>using (var streamReader = new StreamReader(inputFilePath, Encoding.ASCII))
  {
        using (var streamWriter = new StreamWriter(outputFilePath,false))
        {
             char[] bytes = new char[100];
             while (streamReader.Read(bytes, 0, 100) &gt; 0)
             {
                   var data = new string(bytes);
                   streamWriter.WriteLine(data);
             }
             MessageBox.Show("Compleated");
         }
  }
  </code></pre>
  
  <p>Other than <code>ASCII</code> encoding I have tried <code>UTF-7</code>, <code>UTF-8</code>, <code>UTF-32</code> and <code>IBM500</code>. But no luck in reading and writing multi language characters. </p>
  
  <p>Please help me to achieve this.</p>