0

I was able to set std::locale to "en-US.UTF8" but I don't know the correct version of it for UTF16 encoding.

  • Does this answer your question? [Unable to set UTF-16 as locale](https://stackoverflow.com/questions/36592540/unable-to-set-utf-16-as-locale) – Gandhi Dec 05 '22 at 12:21
  • 1
    Check this https://stackoverflow.com/questions/71328697/using-utf-16-for-i-o-with-visual-studio-instead-of-code-pages – Victor Gubin Dec 05 '22 at 12:23
  • If you are using Windows Win32, Victor's link has the answer (in particular, **phuclv**'s answer). If you are using Windows WSL, Gandhi's link has the answer. – Eljay Dec 05 '22 at 12:27
  • @Eljay _setmode accepts FILE* and cannot be used with std::wofstreams. It seems that there is no answer... even though Windows now natively uses UTF16 internally. – Software Carpenter Dec 06 '22 at 01:16

0 Answers0