How convert FText to Ut8 string in c++

Hi guys,

I dont found the way to convert a FText string, from a TextboX in my WidgetBP, to a UTF8 string.

Thanks for your help.

Not sure about why you need utf-8, but standart text to string is:

FText MyText = TEXT("This is text");
 FString MyString = *MyText;

 std::string MySpecialString(TCHAR_TO_UTF8(*MyString));

I’m french and i have special caracters like : “é”, and FString dont support those caracters. That’s why i need UTF8

Updated answer, hope it helps :slight_smile: