Использовать UnicodeString в Boost

Я прочитал это ICU библиотека используется по умолчанию backend в boost::locale, Если да, можем ли мы использовать UnicodeString тип реанимации в бусте? Может кто-нибудь, пожалуйста, приведите пример ..

РЕДАКТИРОВАТЬ: Это то, что я попытался в конце концов .. Здесь, вместо сохранения в WSTRING, мне нужна UnicodeString.

#include <boost/locale.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/fstream.hpp>
#include <fcntl.h>
#include <io.h>
int main()
{

boost::locale::localization_backend_manager my = boost::locale::localization_backend_manager::global();
my.select("icu");_setmode(_fileno(stdout), _O_WTEXT); // for output

std::locale::global(boost::locale::generator(my).generate(""));boost::filesystem::path::imbue(std::locale());
boost::filesystem::wifstream hello("I:\\a.txt");//Contents of this file can be strings in regional language

if (hello.is_open())
{

for (std::wstring s; getline(hello, s); )
{
std::wcout << s;//need a UnicodeString instead of s.
std::wstring cmd = L"I:\\";
cmd += s;
boost::filesystem::wifstream hello1(cmd);
if (hello1.is_open())
{
std::wstring i;
while(getline(hello1,i))
std::wcout << i;
}
hello1.close();

}
}
hello.close();
}

0

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …