还有BASE64编码...给跪啦..新手

解决方案 »

  1.   

    base 64 : #include <atlenc.h>
    utf-8: WideCharToMultiByte(CP_UTF8, ...)
    url的因为是公司代码,不方便贴
      

  2.   

    开源的有很多啊,搜一下 url encode
      

  3.   

    csdn下载频道都有现成的代码,去下载并集成到软件中就行了。
      

  4.   

    //**************************************
    // unicode字符串转utf8字符串
    // 返回大于0成功,小于0失败
    //**************************************
    int
    ustr_u8str( WCHAR *unicodestr, char *utf8str )
    {
    int result = 0;
    try
    {
    int needlen = WideCharToMultiByte( CP_UTF8, 0, unicodestr, -1, NULL, 0, NULL, NULL );
    if( needlen < 0 )
    {
    return needlen;
    } result = WideCharToMultiByte( CP_UTF8, 0, unicodestr, -1, utf8str, needlen + 1, NULL, NULL );
    if( result < 0 )
    {
    return result;
    }
    return ( result - 1 );
    }
    catch( ... )
    {
    ShowError();
    }
    return result;
    }