fork download
  1. #include <iostream>
  2. #include <codecvt>
  3. #include <locale>
  4.  
  5. int main() {
  6. std::u32string S = U"Жěěěра, не кепишуй!";
  7. std::wstring_convert<std::codecvt_utf8<char32_t>, char32_t> cnv;
  8. for(const auto &c:S) std::cout << cnv.to_bytes(c) << std::endl;
  9. return 0;
  10. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
Ж
ě
ě
ě
р
а
,
 
н
е
 
к
е
п
и
ш
у
й
!