using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;
namespace test
{
public class test
{
[STAThread]
public static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
using (var writer = new StreamWriter("test1.txt", false, Encoding.UTF8))
{
writer.WriteLine("UTF8");
writer.WriteLine("あいうえお");
}
File.WriteAllText("test2.txt", "ShiftJis\r\nあいうえお", Encoding.GetEncoding("shift-jis"));
var form = new Form();
var browser1 = new WebBrowser();
browser1.Dock = DockStyle.Fill;
browser1.Url = new Uri(Path.GetFullPath("test1.txt"));
var browser2 = new WebBrowser();
browser2.Dock = DockStyle.Fill;
browser2.Url = new Uri(Path.GetFullPath("test2.txt"));
var split = new SplitContainer();
split.Orientation = Orientation.Horizontal;
split.Dock = DockStyle.Fill;
split.Panel1.Controls.Add(browser1);
split.Panel2.Controls.Add(browser2);
form.Controls.Add(split);
Application.Run(form);
}
}
}