From e4e226b2c77b2eefaafb119456a8271dc8098916 Mon Sep 17 00:00:00 2001 From: bao-qian Date: Sun, 12 Feb 2017 17:22:56 +0000 Subject: [PATCH] force pinyin library static constructor initialize #858 --- Wox.Infrastructure/Alphabet.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Wox.Infrastructure/Alphabet.cs b/Wox.Infrastructure/Alphabet.cs index 8bf71321ca..157d1c9f1f 100644 --- a/Wox.Infrastructure/Alphabet.cs +++ b/Wox.Infrastructure/Alphabet.cs @@ -23,6 +23,8 @@ namespace Wox.Infrastructure { _pinyinStorage = new BinaryStorage>("Pinyin"); PinyinCache = _pinyinStorage.TryLoad(new ConcurrentDictionary()); + // force pinyin library static constructor initialize + PinyinHelper.toHanyuPinyinStringArray('T', Format); }); Log.Info($"|Wox.Infrastructure.Alphabet.Initialize|Number of preload pinyin combination<{PinyinCache.Count}>"); }