阅读背景:

宽字符wchar、窄字符char、无符号字符(unsigned char)之间的转换

来源:互联网 


头文件:

  

 typedef char                                        str_ansi;
 typedef unsigned char                               str_utf8;
 typedef wchar_t                                     str_utf16;

class CAPECharacterHelper
{
public:
    static str_ansi * GetANSIFromUTF8(const str_utf8 * pUTF8);
    static str_ansi * GetANSIFromUTF16(const str_utf16 * pUTF16);
    static str_utf16 * GetUTF16FromANSI(const str_ansi * pANSI);
    static str_utf16 * GetUTF16FromUTF8(const str_utf8 * pUTF8);
    static str_utf8 * GetUTF8FromANSI(const str_ansi * pANSI);
    static str_utf8 * GetUTF8FromUTF16(const str_utf16 * pUTF16);
}; typedef char                   



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: