Beispiel #1
0
 //-------------------------------------------------------------------------
 public string Utf8ToGB2312(string utf8String)
 {
     if (Application.platform == RuntimePlatform.IPhonePlayer)
     {
         Debug.Log("_Utf8ToGB2312 转换前 = " + utf8String);
         string s = NativeiOS.MFWUTF8ToGB2312(utf8String);
         Debug.Log("_Utf8ToGB2312 转换后 = " + s);
         return(s);
     }
     else
     {
         return(_EncodingConvert(utf8String, m_UTF8, m_GB2312));
     }
 }
Beispiel #2
0
        //-------------------------------------------------------------------------
        public string GB2312ToUtf8(string gb2312String)
        {
            if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
                Debug.Log("_GB2312ToUtf8 转换前 = " + gb2312String);
                string s = NativeiOS.MFWGB2312toUTF8(gb2312String, gb2312String.Split(NativeiOS.m_bSplit).Length);
                Debug.Log("_GB2312ToUtf8 转换后 = " + s);

                return(s);
            }
            else
            {
                return(_EncodingConvert(gb2312String, m_GB2312, m_UTF8));
            }
        }