https://bugs.llvm.org/show_bug.cgi?id=47302

            Bug ID: 47302
           Summary: mingw-w64: std::wcout after _setmode(_fileno(stdout),
                    _O_WTEXT) doesn't work
           Product: libc++
           Version: 10.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: nguyen.long.908...@gmail.com
                CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com

Take this code snippet:
#include <iostream>
#include <io.h>
#include <fcntl.h>

int wmain(int argc, const wchar_t* argv[])
{
    _setmode(_fileno(stdout), _O_WTEXT);
    std::wcout << L"Thử nghiệm\n";
    return 0;
}

On MS STL, this correctly outputs the string, but on libc++ it outputs nothing.

Additional notes:
Add -municode when compiling with clang, and add /utf-8 when compiling with
MSVC

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to