예제 #1
0
        /// <summary>
        /// 簡體轉繁體
        /// </summary>
        /// <param name="pSource">要轉換的繁體字:體</param>
        /// <returns>轉換後的簡體字:體</returns>
        public string ToTraditional(string pSource)
        {
            pSource = FR_Reserved.ReplaceAll(pSource);
            String tTarget = new String(' ', pSource.Length);
            int    tReturn = LCMapStringEx(LOCALE_SYSTEM_DEFAULT, LCMAP_TRADITIONAL_CHINESE, pSource, pSource.Length, tTarget, pSource.Length);

            tTarget = FRRevert_Reserved.ReplaceAll(tTarget);
            return(tTarget);
        }
예제 #2
0
        /// <summary>
        /// 繁體轉簡體
        /// </summary>
        /// <param name="pSource">要轉換的繁體字:體</param>
        /// <returns>轉換後的簡體字:體</returns>
        public string ToSimplified(string pSource)
        {
            pSource = FR_Reserved.ReplaceAll(pSource);
            String tTarget = new String(' ', pSource.Length);
            int    tReturn = LCMapStringEx(LOCALE_SYSTEM_DEFAULT, LCMAP_SIMPLIFIED_CHINESE, pSource, pSource.Length, tTarget, pSource.Length);

            tTarget = FRRevert_Reserved.ReplaceAll(tTarget);
            return(tTarget);
        }