What is the simplest method to save or load a couple of sf::Strings without data lost?
std::ifstream file("example.txt");
string standardLine;
if(!file) return false;
while(std::getline(file, standardLine))
{
std::basic_string<sf::Uint32> utf32;
sf::Utf8::toUtf32(standardLine.begin(), standardLine.end(), std::back_inserter(utf32));
strings.push_back(utf32);
}
This seems not to work correctly the output looks like the wrong encoding. example.txt is filled with Unicode characters and the output of a loaded sf::String looks like this: [][][][][][][]