_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › Utf-8ToUnicode

Contents

1 power shell
2 c#
3 performance


1 power shell #

utf8.txt(utf-8 ) 殊 unicode.txt(unicode)朱 覲
powershell -Command "Get-Content d:\utf8.txt -Encoding UTF8 | Set-Content -Encoding UNICODE d:\unicode.txt"


2 c# #

/*
 * Created by SharpDevelop.
 * User: jaehak-lee
 * Date: 2016-03-28
 * Time: ろ 4:25
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Text;
using System.IO;

/*
namespace utf8_to_unicode
{
	public static class Program
	{	
		static void Main(string[] args)
        {
            using (StreamReader sr = new StreamReader(args[0], Encoding.UTF8))
            using (StreamWriter sw = new StreamWriter(args[1], false, Encoding.Unicode))
            {
                string line;
                int i = 1;
                while ((line = sr.ReadLine()) != null)
                {
                	if (i > 1) sw.Write("\r\n" + line);
                	else sw.Write(line);
                    i++;
                    
                    //sw.WriteLine(line);
                }
            }

        }
	}
}
*/


namespace utf8_to_unicode
{
	public static class Program
	{	
		static void Main(string[] args)
        {
            using (StreamReader sr = new StreamReader(args[0], Encoding.UTF8))
            using (StreamWriter sw = new StreamWriter(args[1], false, Encoding.Unicode))
            {
                string line;
                line = sr.ReadLine();
                if (line != null) sw.Write(line);
                
                while ((line = sr.ReadLine()) != null)
                {
                	sw.Write("\r\n" + line);
                }
            }

        }
	}
}
utf8_to_unicode.zip

3 performance #

ssis襯 伎 1,552螳 殊 10螳襦 覲豌襴 企瓦. power shell襦 13覿, c#朱 22豐
power shell 旧企
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:53

覓伎瑚襯 企り 襷 る 語 企襯 螳 螳 螳 . 覓伎 れ 襷 蟇一 讌 れ . (れ梗)