fork(3) download
  1. #include <iostream>
  2. #include <locale>
  3. #include <string>
  4.  
  5. using namespace std;
  6.  
  7. int main() {
  8. locale::global(locale("C"));
  9. wcin.imbue(locale("C.UTF-8"));
  10. wstring s;
  11. wcin >> s;
  12. cout << s.length() << " " << (s == L"áéú");
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 5168KB
stdin
áéú
stdout
0 0