The string "abcu1111u2222u3333" is sent to my input, where "u1111", "u2222" and "u3333" are the utf8 characters (Chinese there, to be exact).

int main() { const char* input = "abсu1111u2222u3333"; wchar_t* out = ???; } 

How to convert it? Maybe someone came across?

  • one
    std :: mbstowcs - αλεχολυτ
  • What is “unicode”, it is different, what is it, specifically? - ixSci
  • Maybe in the line is still such "abс\u1111\u2222\u3333" ? - avp
  • "utf8 characters" - this can not be, at UTF-8 variable length. This is UTF-16 or UCS-2. - Abyx
  • in any case, the string can be easily parsed with hands - Abyx

0