-1

i executed this code as TCP client:

        boost::system::error_code error;
        const std::string msg = "Hello from Client!\n";
        boost::asio::write(socket, boost::asio::buffer(msg), error);
        std::cout << "error.message(): " << error.message() << std::endl;

and got this message: error.message(): ╬яхЁрЎш  єёях°эю чртхЁ°хэр

I use windows 10. Should i change language somewhere? Why it is not readable.

vova
  • 63
  • 8

1 Answers1

0

Try to insert setlocale(0, ""); before printing the message;

alex_noname
  • 26,459
  • 5
  • 69
  • 86
  • That helps. Now i have message in readable russian language. Can i make this message on english? – vova Dec 31 '20 at 12:04
  • 1
    See https://stackoverflow.com/questions/17465526/how-to-get-boostsystemerror-codemessage-in-english – alex_noname Dec 31 '20 at 12:11