CString EncodeChinese(CString InputStr)
{
int cur;
CString tempstr,returnstr;
CString ws,temp1;
WCHAR mid[2];
ws.Format("%s",InputStr);
cur=ws.GetLength();
for(int i=0;i<ws.GetLength();i++)
{
temp1=ws.Mid(i,2);
MultiByteToWideChar(CP_ACP,0,temp1.GetBuffer(0),-1,mid,2);
cur=mid[0];
if(cur>0xFF)i++;
tempstr.Format("%04X",cur);
returnstr=returnstr+tempstr;
}
return returnstr;
}