title: How to Read and modify Hindi .rtf file programmatically?
body: <p>I have a hindi RTF file with content like:</p>
  <blockquote>
  <p>कोलकाता, 11 दिसंबर  पश्चिम बंगाल के बर्दवान जिले में कक्षा नौ की एक छात्रा ने फांसी लगाकर आत्महत्या कर ली।</p>
  </blockquote>
  <p>In my console application I want to read that RTF file and Change some content programatically.</p>
  <p>I using streamreader to read the file but when converting to string it is producing the following output:</p>
  <blockquote>
  <p>ÚUæCþUèØ-SßæS‰Ø</p>
  <p>×Âý Ñ Sßæ§Ù Üê •¤è ¼ßæ ÂØæü# ×æ˜æ ×ð´ ãUôÙð •¤æ ¼æßæ</p>
  <p>ÖæðÂæÜ, vv ç¼â¢ÕÚ (¥æ§ü°°Ù°â)Ð ×ŠØ Âý¼ðàæ ×ð´ Sßæ§Ù Üê ¥æñÚ ÇðU¢»ê âð ¥Õ Ì•¤ •¤§ü Üæð»æð´ •¤è ×æñÌ ãUæð ¿é•¤è ãñU ¥õÚU ¥SÂÌæÜ ×ð´ ç¿ç•¤ˆâ•¤èØ âéçßÏæ¥ô´ •¤è •¤×è •ð¤ âæÍ-âæÍ ¼ßæ¥ô´ •ð¤ ¥Öæß •ð¤ Öè ¥æÚUæðÂ Ü»Ìð ÚãðU ãñU¢Ð</p>
  <p>SßæS‰Ø çßÖæ» Ùð ãUæÜæ¢ç•¤ ØãU ¼æßæ ç•¤Øæ ãñU ç•¤ Úæ…Ø ×ð´ ×æñâ×è ÚUæð», Sßæ§Ù Üê •ð¤ ©Â¿æÚ •ð¤ çÜ° Âý¼ðàæ •ð¤ ¥SÂÌæÜæð´ ×ð´ ¥æßàØ•¤ ¼ßæ¥æð´ •¤æ ÂØæü# ÂýÕ¢Ï ç•¤Øæ »Øæ ãñUÐ</p>
  </blockquote>
  <p>I have tried the windows form RichTextBox to read the RTF file, but it always show Invalid File Format.</p>
  <p>So what will be the best possible solution to read and modify rtf file in C#</p>
  <pre><code>StreamReader sr = new StreamReader(fpath, Encoding.Default, true);
  string s1 = sr.ReadToEnd();
  sr.Close();
  </code></pre>
  <p>also tried</p>
  <pre><code>using (System.Windows.Forms.RichTextBox rtBox = new System.Windows.Forms.RichTextBox())
  {
      // Get the contents of the RTF file. Note that when it is 
      // stored in the string, it is encoded as UTF-16. 
      string s = System.IO.File.ReadAllText(fpath);
  
      // Convert the RTF to plain text.
      rtBox.Rtf = s; // error file format invalid
      string plainText = rtBox.Text;
  }
  </code></pre>