Информация об изменениях

Сообщение Re[3]: string to wstring от 29.10.2015 22:44

Изменено 29.10.2015 22:46 Nikе

Здравствуйте, LeoMonster, Вы писали:

LM>error: ‘wstring_convert’ is not a member of ‘std’

LM>The reason why GCC rejects this code is simple: libstdc++ doesn't support <codecvt> yet.

Хм, ну тогда iconv_string.
Здравствуйте, LeoMonster, Вы писали:

LM>error: ‘wstring_convert’ is not a member of ‘std’

LM>The reason why GCC rejects this code is simple: libstdc++ doesn't support <codecvt> yet.

Хм, ну тогда iconv_string.

char* result = nullptr;
const char* dst = (const char *)desc.Ptr();
#define WCHART_ALIAS "UTF-32LE" // android
#define WCHART_ALIAS "wchar_t" // linux

if( iconv_string ("UTF-8", WCHART_ALIAS, dst, dst + wcslen( dst ), &result, &size ) != 0 )
{
failed;
}
else
{
successful;
}