Does this answer your question? [jstring(JNI) to std::string(c++) with utf8 characters](https://stackoverflow.com/questions/41820039/jstringjni-to-stdstringc-with-utf8-characters)
– TharsalysOct 26 '21 at 09:14
In C++ Uhicode strings are represented by `std::u16string` for UTF16, `std::u8string` for UTF8 and `std::u32string` for UTF32. `std::string` is for single-byte codepages. It can only be used for Unicode text if it's treated as a raw sequence of bytes. It's *way* to easy to mangle data by treating individual bytes as if they were characters
– Panagiotis KanavosOct 26 '21 at 09:26