I use the usual libraries of string and regex, it took to write an application that parses the string with regulars, the array of values ​​found surprised ... I wrote the code for pure testing:

string str = "конечно"; cout << str << endl; regex re("([А-я]+)"); smatch sm; regex_search(str, sm, re); cout << sm[0] << endl; 

Conclusion:

 конечно коне\321 

How to get rid of unicode characters?

  • boost.org/doc/libs/1_62_0/libs/regex/doc/html/boost_regex/ref/… , a regular regex does not seem to know how to work with utf, you can still try to convert it all into wstring - J. Doe
  • Use wstring , wregex , wsmatch , wcout , maybe SetConsoleOutputCP(1251); SetConsoleCP(1251); SetConsoleOutputCP(1251); SetConsoleCP(1251); . In what environment is the code executed? - Wiktor Stribiżew

0