Some time ago, I used NPinyin.dll to convert Chinese to pinyin to get the first letter. The recent version iteration found that it can’t be used. Encoding.GetEncoding("gb2312"); After this code, all subsequent statements are not executed. I couldn't find the reason. I thought it was caused by the non-existence of some library files, so I simply didn't deal with it later. I found a Microsoft implementation method to solve this problem, and it is the Zhenxiang series!
Next, start to explain the implementation method: First, download the software ZIP package from the Microsoft official website and get the vsintlpack1.zip compressed package, unzip it and install the following software: CHSPinYinConv.msi.
After installation, find the software installation directory, and get the dll library file we need: chncharinfo.dll
The next step is to import it into Unity, and start our code implementation. .
//引用命名空间
using Microsoft