This article is a mirror article of machine translation, please click here to jump to the original article.

View: 47895|Reply: 2

[Console Program] C# Chinese Chinese characters are converted between simplified and traditional characters

[Copy link]
Posted on 2020-5-10 11:59:27 | | | |
Due to project requirements, it is necessary to convert the Chinese and traditional Chinese characters submitted by the user to simplified Chinese.

Using C#, convert simplified and traditional Chinese between Chinese and traditional characters, first look at the effect, as shown in the figure below:



The effect is actually not ideal, "Yu" and "Yun" have not been converted correctly, and I feel that the underlying principle is similar to the conversion of a poor dictionary, and it cannot be found in the dictionary, so naturally it cannot be converted.

two ways to achieve it, the second of which isMicrosoft.VisualBasic.dll needs to be referenced

Source:



Other Ways (Not Tested)

Use the Microsoft library Microsoft Visual Studio International Feature Pack 2.0
Microsoft Visual Studio International Feature Pack 2.0 includes a set of controls and class libraries designed to help . .NET developers create internationalization programs.
Download Address:https://www.microsoft.com/zh-cn/download/details.aspx?id=18970
After downloading: Run the file VSIPSetup.msi and complete the installation (the default installation directory on x86 operating systems is %SYSTEMDRIVE%\Program Files\Microsoft Visual Studio International Feature Pack 2.0; The default installation directory on x64 operating systems is %SYSTEMDRIVE%\Program Files (x86)\Microsoft Visual Studio International Feature Pack 2.0)

Code Demo



Using Microsoft.Office.Interop.Word to combine word translation, office must be installed in the server environment (omitted)




Previous:is back
Next:WeChat Mini Program Error: error message Cannot find module 'wx-server-sdk'
 Landlord| Posted on 2020-5-10 12:15:03 |
Download the installation package from Microsoft's official website:https://www.microsoft.com/zh-cn/download/details.aspx?id=15251Download and unzip it, there are 7 MSI installation files.

CHTCHSConv.msi is to perform traditional and simplified Chinese interconversion components

After the installation is complete, add references in VS

C:\Program Files(x86)\Microsoft Visual Studio International Pack\Traditional Chinese to Simplified Chinese Conversion Library and Add-In Tool(繁简互转)
 Landlord| Posted on 2021-7-16 15:47:16 |
.NET Core Chinese Character Generation Pinyin Solution
https://www.itsvse.com/thread-9572-1-1.html
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com