C++ (Qt) QTextCodec *xcodec = QTextCodec::codecForName("Windows-1251"); QString text = xcodec->fromUnicode(ui->textLineEdit->text()); QUrl param( text ); QString url = QString("/my_script.php?mytext=" + param.toEncoded());
C++ (Qt) QTextCodec *xcodec = QTextCodec::codecForName("windows-1251");
C++ (Qt) QByteArray text = xcodec->fromUnicode(ui->textLineEdit->text());
C++ (Qt) QString text = xcodec->fromUnicode(ui->textLineEdit->text());
C++ (Qt) QString mytext = ui->textLineEdit->text(); QString text = mytext.toUtf8();
PHP<?if(isset($_POST['mytext']) && $_POST['mytext']=="hello") {echo "good";}elseif(isset($_POST['mytext']) && $_POST['mytext']=="russky_tekst") {echo "good too";}else{echo "bad";}?>
C++ (Qt) QByteArray ba("mytext="); ba.append( text.toUtf8() ); http->request(header,ba);
C++ (Qt) QByteArray ba("mytext="); ba.append(text); http->request(header,ba);