Search code examples
batch-filecmd

Why are Danish characters not displayed as in text editor on executing batch file?


I make a simple batch file, but Windows command processor cmd.exe does not display Danish characters correct when I execute the batch file. It shows weird characters like ├ª├©├Ñ instead ÆØÅ. If I type echo æøå directly in cmd window, it shows æøå.

Is there something wrong with my computer?


Solution

  • Use chcp to manage your code page.

    Like Mofi said, specifying the following would help your case:

    chcp 1252
    

    Use this line of code before you print echo æøå.