Using Unreal Engine 4, I want to load a file from the machine, which contains characters like “
, ”
, ‘
and ’
.
All conversion attempts result in the final FString
either containing ?
in their place, or no character at all.
FString
is UE4's internal string class, that uses TCHAR
(wchar_t
), which uses UTF-16 encoding.
Even desperate attempts to use this failed:
std::replace(str.begin(), str.end(), L'“', L'\"');
Nothing happened.
How can I properly convert between a std::string
to an FString
?