mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
ToPinyin: Convert to SimpChinese at first
This commit is contained in:
@@ -77,6 +77,7 @@ namespace Wox.Infrastructure
|
||||
public static string ToPinYin(string txt)
|
||||
{
|
||||
txt = txt.Trim();
|
||||
txt = Microsoft.VisualBasic.Strings.StrConv(txt, Microsoft.VisualBasic.VbStrConv.SimplifiedChinese, 0);
|
||||
byte[] arr = new byte[2]; //每个汉字为2字节
|
||||
StringBuilder result = new StringBuilder();//使用StringBuilder优化字符串连接
|
||||
int charCode = 0;
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.VisualBasic" />
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\packages\Newtonsoft.Json.5.0.8\lib\net35\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
Reference in New Issue
Block a user