When working with text consoles, please note that file names returned by
readdir() are represented in the default ANSI code page while any output to
console is typically formatted on another code page. Thus, non-ASCII
characters in file names will not usually display correctly on console. The
problem can be fixed in two ways:(1) change the character set of console
to 1252 using chcp utility and use Lucida Console font, or(2) use
_cprintf function when writing to console. The _cprinf() will re-encode
ANSI strings to the console code page so many non-ASCII characters will
display correcly.
Read next directory entry.
When working with text consoles, please note that file names returned by readdir() are represented in the default ANSI code page while any output to console is typically formatted on another code page. Thus, non-ASCII characters in file names will not usually display correctly on console. The problem can be fixed in two ways:(1) change the character set of console to 1252 using chcp utility and use Lucida Console font, or(2) use _cprintf function when writing to console. The _cprinf() will re-encode ANSI strings to the console code page so many non-ASCII characters will display correcly.