aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test/echo.cpp
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-10-16 10:09:42 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-10-16 10:09:42 +0300
commit1596a66c21ec7da87779655bbb878bbb8536b0d7 (patch)
treeb1d5f07a411982111d2a704da5b95806754f9477 /test/echo.cpp
parentrename utility "args" to "echo" (diff)
downloadwinapi-common-1596a66c21ec7da87779655bbb878bbb8536b0d7.tar.gz
winapi-common-1596a66c21ec7da87779655bbb878bbb8536b0d7.zip
echo: make it really UTF-16
Diffstat (limited to '')
-rw-r--r--test/echo.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/echo.cpp b/test/echo.cpp
index 6d6e6df..8f01953 100644
--- a/test/echo.cpp
+++ b/test/echo.cpp
@@ -5,9 +5,16 @@
// Simple UTF-16 echo.
+// clang-format off
+#include <io.h>
+#include <fcntl.h>
+// clang-format on
+
#include <iostream>
int wmain(int argc, wchar_t* argv[]) {
+ _setmode(_fileno(stdout), _O_U16TEXT);
+
for (int i = 1; i < argc; ++i) {
std::wcout << argv[i] << L'\n';
}