Question & Answer
How to change the codepage for DOS batch files to ANSI
The Windows command interpreter (CMD.exe) and thus any DOS batch file use a different codepage (437) than other Windows applications, like Notepad or the CD Command Line Interface (Direct.exe). This may cause issues with special characters.
For example when your batch file generates an input file for your Windows application from a directory listing. Any file name containing a special character, like a German umlaut, will not show up correctly in your Windows application and likely cause it to fail.
The solution is to
change the codepage at the beginning of your batch file using the CHCP
To change the codepage to 1252 (ANSI - Latin I), type:
For more information on the CHCP command, type:
24 July 2020