-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
bugSomething isn't workingSomething isn't workinginvalidThis issue is incorrect or by designThis issue is incorrect or by design
Description
Describe the bug
When the full-width character is output in cout, blank is output without permission
Command-line test case
C:\Temp>type main.cpp
// file encoding: utf-8 or Shift JIS
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
system("chcp 932 > NUL"); // system("chcp 65001 > NUL");
cout << "あいうえお" << endl;
}
C:\Temp>cl /EHsc /W4 /WX /utf-8 main.cpp
or
C:\Temp>cl /EHsc /W4 /WX main.cpp
Оптимизирующий компилятор Microsoft (R) C/C++ версии 19.27.29109 для x64
(C) Корпорация Майкрософт (Microsoft Corporation). Все права защищены.
main.cpp
Microsoft (R) Incremental Linker Version 14.27.29109.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:main.exe
main.obj
C:\Temp>main.exe
あいうえお
Expected behavior
Should print without additional spaces.
Actually it works. I can't reproduce the bug.
Works for both utf-8 and Shift JIS.
STL version
Microsoft Visual Studio Community 2019 Preview Version 16.7.0 Preview 6.0
Additional context
VSO-441122 / AB#441122 | DevCom-59694
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinginvalidThis issue is incorrect or by designThis issue is incorrect or by design
