[llvm-bugs] [Bug 47302] New: mingw-w64: std::wcout after _setmode(_fileno(stdout), _O_WTEXT) doesn't work
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Aug 24 22:14:49 PDT 2020
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: unassignedclangbugs at nondot.org
Reporter: nguyen.long.908132 at gmail.com
CC: llvm-bugs at lists.llvm.org, mclow.lists at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200825/4990dfca/attachment.html>
More information about the llvm-bugs
mailing list