[libcxx-commits] [PATCH] D146398: [libcxx] Fix using std::wcout/wcin on Windows with streams configured in wide mode

Igor Zhukov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Mar 25 05:28:59 PDT 2023


fsb4000 accepted this revision.
fsb4000 added a comment.

Sorry, I didn't have time on the weekdays. But I have time today.

Yes, it looks good.

I restarted CI but it seems it doesn't work currently...

And I checked on my machine with `_O_WTEXT` and `_O_U16TEXT` that issue example in a debugger.

  #include <iostream>
  #include <io.h>
  #include <fcntl.h>
  
  int main()
  {
  	_setmode(_fileno(stdout), _O_U16TEXT);
  	std::wcout << L"Thử nghiệmПривет\n";
  	return 0;
  }

F26889573: изображение.png <https://reviews.llvm.org/F26889573>
F26889585: изображение.png <https://reviews.llvm.org/F26889585>

By the way how should I apply the patch locally?

I tried this way:

1. Save file https://reviews.llvm.org/file/data/4ebdk4eqonefejv45365/PHID-FILE-kpusoqwct45nr6shhmdk/D146398.diff

2. git checkout f721fcb <https://reviews.llvm.org/rGf721fcb6ed0a186b8f146282467dd8420a5a36d0>

3. git apply D146398 <https://reviews.llvm.org/D146398>.diff

But I got an error that git couldn't apply. So I just manually copy-pasted the changes locally.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146398/new/

https://reviews.llvm.org/D146398



More information about the libcxx-commits mailing list