#include "boost/program_options/detail/utf8_codecvt_facet.hpp"

int test()
{
std::wifstream f(L"测试.xml");
std::locale utf8Locale(std::locale(),new boost::program_options::detail::utf8_codecvt_facet());
f.imbue(utf8Locale);

if(f)
{
boost::property_tree::read_xml(f,pt);
std::wstring text = pt.get(L"test",L"");
MessageBox(NULL,text.c_str(),L"",MB_OK);
}
}

  

相关文章:

  • 2021-07-04
  • 2021-12-15
  • 2021-06-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2022-01-21
  • 2021-11-06
  • 2022-01-18
相关资源
相似解决方案