Skip to content

Instantly share code, notes, and snippets.

@auycro
Created August 2, 2018 13:22
Show Gist options
  • Save auycro/7e320a7ada5e3e0c02838563832716b2 to your computer and use it in GitHub Desktop.
Save auycro/7e320a7ada5e3e0c02838563832716b2 to your computer and use it in GitHub Desktop.
Convert SHIFT-JIS To UTF8
//---Created by Gumpanat Keardkeawfa on 2018Aug02.---
//---Copyright © 2018 Auycro. All rights reserved.---
using System.IO;
using System.Text;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
string path = args[0];
string readText = File.ReadAllText(path, Encoding.GetEncoding(932));
//BOM付けUTF8のテキストファイル
StreamWriter sw = new StreamWriter(
path, false, System.Text.Encoding.UTF8
);
sw.Write(readText);
sw.Close();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment