QByteArray sendBuf; QTextCodec *codec = QTextCodec::codecForName("gb2312"); codec->fromUnicode(sendBuf);