草庐IT

lpMsgBuf

全部标签

c++ - boost-asio 错误消息使用的编码是什么?

我正在使用boost-asio,我想正确处理错误消息。在这个例子中,我打错了字(1278而不是127):boost::system::error_codeec;autoaddress=boost::asio::ip::address::from_string("1278.0.0.1",ec);if(ec){autotext=ec.message();//DoSomethingwithtextbutwhatisitsencoding?}我收到一条错误消息,它似乎是在Windows1252中编码的(我使用的是Windows7)。所以看起来编码是操作系统编码。但是,我找不到任何说明这一事实的