CString    str;                  //里面是UTF-8编码
const char  *pstr = LPCTSTR(str);          
int iLength = MultiByteToWideChar(950,0,pstr,-1,NULL,0);
WCHAR *pstrG = new WCHAR[iLength + 2];           //UNICODE码
//转换UTF-8码到Unicode码,使用API函数MultiByteToWideChar
MultiByteToWideChar(950,0,pstr,-1,pstrG,iLength);

iLength = WideCharToMultiByte(936, 0, (PWSTR)pstrG, -1, NULL, 0, NULL, NULL);
//给pszGbt分配内存
char* psz=new char[iLength+1];
if( !psz )
return true;
//转换Unicode码到AscII码,使用API函数WideCharToMultiByte
WideCharToMultiByte(936, 0, (PWSTR)pstrG, -1, psz, iLength, NULL, NULL);

str = psz;
delete psz;
psz = NULL;