Project documents may be written in Chinese and then translated into Japanese. It is difficult to avoid missing Chinese characters, such as "total number" and "choice", if they are completely differentiated by human eyes.
Is there a way to write a program to automatically search for Chinese Characters in Excel or Word documents?
If an Excel file is converted to XML, can the Unicode Internal code be distinguished between Chinese and Japanese?
Using system;
Using system. Collections. Generic;
Using system. text;
Using system. IO;
Namespace consoleapplication2
{
Class Program
{
Static void main (string [] ARGs)
{
String input = "aircraft ah, F, semi-division competition, non-division competition, Division D, Division F, Division D FD さふ SDF recordable machine D フ f s speed coffee alkali speed development room ";
Byte [] DATA = encoding. Unicode. getbytes (input );
Byte [] data2 = encoding. Convert (encoding. Unicode, encoding. getencoding ("shift_jis"), data );
Byte [] data3 = encoding. Convert (encoding. getencoding ("shift_jis"), encoding. Unicode, data2 );
String result = encoding. Unicode. getstring (data3 );
For (INT I = 0; I <input. length; I ++)
{
If (input [I]! = Result [I])
{
Console. backgroundcolor = consolecolor. Cyan;
}
Else
{
Console. backgroundcolor = consolecolor. Black;
}
Console. Write (input [I]);
}
Console. readkey ();
}
}
}