• Eric Pouech's avatar
    cmd: Use OEM code page when reading a file. · f2ca35bd
    Eric Pouech authored
    Calling GetConsoleCP() when ReadConsoleW() fails (potentially indicating
    that cmd.exe's instance isn't attached to a console) makes no sense.
    
    In details, since GetConsoleCP() returns 0 when not attached to a console
    to indicate error, we're in fact using CP_ACP.
    
    So fallback explicitely to OEM CP (which is the default for CUI programs).
    Signed-off-by: 's avatarEric Pouech <eric.pouech@gmail.com>
    f2ca35bd
Name
Last commit
Last update
dlls Loading commit data...
documentation Loading commit data...
fonts Loading commit data...
include Loading commit data...
libs Loading commit data...
loader Loading commit data...
nls Loading commit data...
po Loading commit data...
programs Loading commit data...
server Loading commit data...
tools Loading commit data...
.editorconfig Loading commit data...
.gitlab-ci.yml Loading commit data...
.mailmap Loading commit data...
ANNOUNCE Loading commit data...
AUTHORS Loading commit data...
COPYING.LIB Loading commit data...
LICENSE Loading commit data...
LICENSE.OLD Loading commit data...
MAINTAINERS Loading commit data...
README Loading commit data...
VERSION Loading commit data...
aclocal.m4 Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...