diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-10-16 10:09:42 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-10-16 10:09:42 +0300 |
commit | 1596a66c21ec7da87779655bbb878bbb8536b0d7 (patch) | |
tree | b1d5f07a411982111d2a704da5b95806754f9477 /test/echo.cpp | |
parent | rename utility "args" to "echo" (diff) | |
download | winapi-common-1596a66c21ec7da87779655bbb878bbb8536b0d7.tar.gz winapi-common-1596a66c21ec7da87779655bbb878bbb8536b0d7.zip |
echo: make it really UTF-16
Diffstat (limited to 'test/echo.cpp')
-rw-r--r-- | test/echo.cpp | 7 |
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'; } |