Created
August 2, 2018 13:22
-
-
Save auycro/7e320a7ada5e3e0c02838563832716b2 to your computer and use it in GitHub Desktop.
Convert SHIFT-JIS To UTF8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//---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