diff --git a/Lesson_6/Task_1/Client/client.cpp b/Lesson_6/Task_1/Client/client.cpp index 0cf7f44..6ac016d 100644 --- a/Lesson_6/Task_1/Client/client.cpp +++ b/Lesson_6/Task_1/Client/client.cpp @@ -26,12 +26,12 @@ void Client::sendFile() QFileInfo fi(m_fileName); if (file.open(QIODevice::ReadOnly)) { - m_socket->write((fi.fileName() + '\n').toLocal8Bit()); + m_socket->write((fi.fileName() + '\n').toUtf8()); QTextStream in(&file); while (!in.atEnd()) - m_socket->write((in.readLine() + '\n').toLocal8Bit()); + m_socket->write((in.readLine() + '\n').toUtf8()); } ui->l_status->setText("File sent"); diff --git a/Lesson_6/Task_1/Server/server.cpp b/Lesson_6/Task_1/Server/server.cpp index b94905c..184b2f6 100644 --- a/Lesson_6/Task_1/Server/server.cpp +++ b/Lesson_6/Task_1/Server/server.cpp @@ -58,7 +58,7 @@ void Server::messageFromClient() QFile file(fileName); if (file.open(QIODevice::Append)) { for (int line = 0; line < lines.size(); ++ line) { - file.write((lines[line] + '\n').toLocal8Bit()); + file.write((lines[line] + '\n').toUtf8()); } }