65,176
社区成员




locale loc("chs");
outfile.imbue(loc);
outfile<<L"test你好";
// open wide-char file (yes: Unicode files must be opened as binary!)
std::wofstream file("myfile.uni", std::ios_base::binary);
// choose UTF-16LE encoding
boost::utf::imbue_utf16le(file);
// write byte order mark
file << boost::utf::bom;
std::wifstream file("myfile.uni", std::ios_base::binary);
boost::utf::imbue_utf16le(file);
file >> boost::utf::bom;