Well, depends on the algorithm, I guess. I can see sort() messing up the string. I can see a reverse algorithm also messing up the string. Good point. Didn't think of that. I've rarely run algorithms on UTF8 strings.
If you need to use algorithms on use UTF8 strings, I would recommend you get a UTF8 library for C++ on the web. There are some intuitive ones out there that provide a u8string similar to std::string.