Use Unidecoder instead of ChineseToPinYin

// Please do not use the binary version on NuGet since there are some issues with the data table
This commit is contained in:
Yeechan Lu
2014-03-29 23:29:07 +08:00
parent a104693f97
commit 943a438a6c
6 changed files with 618 additions and 120 deletions

View File

@@ -148,7 +148,7 @@ namespace Wox.Plugin.SystemPlugins
set
{
m_Name = value;
PinyinName = ChineseToPinYin.ToPinYin(m_Name).Replace(" ", "").ToLower();
PinyinName = m_Name.Unidecode();
}
}
public string PinyinName { get; private set; }

View File

@@ -28,8 +28,8 @@ namespace Wox.Plugin.SystemPlugins
set
{
m_Title = value;
string pinyin = ChineseToPinYin.ToPinYin(m_Title);
PinyinTitle = pinyin.Replace(" ", "").ToLower();
string pinyin = m_Title.Unidecode();
PinyinTitle = pinyin;
AbbrTitle = AbbrRegexp.Replace(global::System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(pinyin), "");
if (AbbrTitle.Length < 2) AbbrTitle = null;
}