• 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
..
tests Loading commit data...
Makefile.in Loading commit data...
batch.c Loading commit data...
builtins.c Loading commit data...
cmd.rc Loading commit data...
directory.c Loading commit data...
wcmd.h Loading commit data...
wcmd.ico Loading commit data...
wcmd.svg Loading commit data...
wcmdmain.c Loading commit data...