Here is a sample code in c# to convert a file with UTF-7 encoding to ISO-8859-1 encoding. You can change these values to make any to any converter.


Encoding FromEnc = Encoding.UTF7; // from
Encoding ToEnc = Encoding.GetEncoding("ISO-8859-1"); //to
TextReader tr = new StreamReader(@"C:from.html", FromEnc);
TextWriter tw = new StreamWriter(@"C:to.html",false, ToEnc);
tw.Write(tr.ReadToEnd());
tr.Close();
tw.Close();

Make sure you imported System.IO.

VN:F [1.1.6_502]
Rating: 0.0/5 (0 votes cast)
Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • DotNetKicks
  • LinkedIn
  • Live
  • MySpace
  • StumbleUpon
  • Technorati

Related posts:

  1. UTF7 Converter
  2. Build DateTime from values
  3. Internet connection system tray notifier
  4. What is the difference between CAST and CONVERT in SQL?
  5. System.IO.Compression.GZipStream