ansible/test/integration/targets/win_command/files/crt_setmode.c
Hidetoshi Hirokawa c0331053db Add encoding and codepage params to win_command/win_shell (#54896) (#54966)
* Add output_encoding_override params to win_command/win_shell (#54896)

This enhancement enables Ansible to parse the output of
localized commands that ignore the prompt code page.

* Added changelog and minor nits
2019-11-12 15:58:57 +10:00

15 lines
345 B
C

// crt_setmode.c
// This program uses _setmode to change
// stdout from text mode to binary mode.
// Used to test output_encoding_override for win_command.
#include <stdio.h>
#include <fcntl.h>
#include <io.h>
int main(void)
{
_setmode(_fileno(stdout), _O_BINARY);
// Translates to 日本 in shift_jis
printf("\x93\xFa\x96\x7B - Japan");
}