Пример #1
0
 public static string GetPinyin(char ch, Encoding encoding)
 {
     ch = Pinyin.ConvertEncoding(ch.ToString(), encoding, Encoding.UTF8)[0];
     return(Pinyin.ConvertEncoding(Pinyin.GetPinyin(ch), Encoding.UTF8, encoding));
 }
Пример #2
0
        public static string GetPinyin(string text, Encoding encoding)
        {
            string text2 = Pinyin.ConvertEncoding(text.Trim(), encoding, Encoding.UTF8);

            return(Pinyin.ConvertEncoding(Pinyin.GetPinyin(text2), Encoding.UTF8, encoding));
        }
Пример #3
0
        public static string GetChineseText(string pinyin, Encoding encoding)
        {
            string pinyin2 = Pinyin.ConvertEncoding(pinyin, encoding, Encoding.UTF8);

            return(Pinyin.ConvertEncoding(Pinyin.GetChineseText(pinyin2), Encoding.UTF8, encoding));
        }
Пример #4
0
        public static string GetInitials(string text, Encoding encoding)
        {
            string text2 = Pinyin.ConvertEncoding(text, encoding, Encoding.UTF8);

            return(Pinyin.ConvertEncoding(Pinyin.GetInitials(text2), Encoding.UTF8, encoding));
        }