Compare commits
No commits in common. "9e682e0e95cb34b844102cef8212f3e23d03b715" and "1277c605cd66506abc5e045f9242ad65a6b8ebf2" have entirely different histories.
9e682e0e95
...
1277c605cd
@ -1,4 +1,9 @@
|
||||
using System.Text;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AutoRranslateTextToCsv
|
||||
{
|
||||
|
||||
19
Program.cs
19
Program.cs
@ -11,7 +11,7 @@ namespace AutoRranslateTextToCsv
|
||||
const string InDir = "Input";
|
||||
const string OutDir = "Out";
|
||||
const string SrcDataFile = "_TextDictionary.csv";
|
||||
const string Ver = "0.8";
|
||||
const string Ver = "0.5";
|
||||
static Dictionary<string, string> mDictSrcData;
|
||||
static Dictionary<char, char> DictTongJia = new Dictionary<char, char>();
|
||||
static void Main(string[] args)
|
||||
@ -96,18 +96,12 @@ namespace AutoRranslateTextToCsv
|
||||
|
||||
public static bool LoadCsv(string path, out Dictionary<string, string> _dictSrcData)
|
||||
{
|
||||
_dictSrcData = new Dictionary<string, string>();
|
||||
//using (StreamReader sr = new StreamReader(path, Encoding.GetEncoding("gb2312")))
|
||||
using (StreamReader sr = new StreamReader(path, new UTF8Encoding(true)))
|
||||
_dictSrcData = new Dictionary<string, string>();
|
||||
using (StreamReader sr = new StreamReader(path, Encoding.GetEncoding("gb2312")))
|
||||
{
|
||||
int linecount = -1;
|
||||
|
||||
while (!sr.EndOfStream)
|
||||
{
|
||||
linecount++;
|
||||
if (linecount == 45982)
|
||||
{
|
||||
|
||||
}
|
||||
string line = sr.ReadLine();
|
||||
string[] values = line.Split(',');
|
||||
if (values.Length >= 2)
|
||||
@ -172,10 +166,7 @@ namespace AutoRranslateTextToCsv
|
||||
for (int j = 0; j < valueArr.Length; j++)
|
||||
{
|
||||
if (j == 3)
|
||||
{
|
||||
//newline += EncodingConvert(Encoding.GetEncoding("gb2312"), Encoding.GetEncoding("shift-jis"), Resultline);
|
||||
newline += EncodingConvert(new UTF8Encoding(true), Encoding.GetEncoding("shift-jis"), Resultline);
|
||||
}
|
||||
newline += EncodingConvert(Encoding.GetEncoding("gb2312"), Encoding.GetEncoding("shift-jis"), Resultline);
|
||||
else
|
||||
newline += valueArr[j];
|
||||
|
||||
|
||||
369102
_TextDictionary.csv
369102
_TextDictionary.csv
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user