fork(3) download
  1. #include <string>
  2. #include <codecvt>
  3. #include <locale>
  4. using namespace std;
  5.  
  6. int main() {
  7. setlocale(LC_ALL, "ru_RU.UTF-8");
  8. string s = "🜆";
  9.  
  10. wstring_convert<codecvt_utf8<char16_t>, char16_t> converter;
  11. u16string s16 = converter.from_bytes(s);
  12. return 0;
  13. }
Success #stdin #stdout 0s 16888KB
stdin
Standard input is empty
stdout
Standard output is empty