5

So, i'm trying to make a nice batch menu but everytime i try to use unicode's fancy lines i just get random characters. Is there any way to put unicode in cmd and or a batch file?

3
  • 5
    Put this in your batch chcp 65001 This will change it to utf-8
    – Narzard
    May 10, 2016 at 18:26
  • This worked, but how do i set it as default?
    – user531558
    May 11, 2016 at 6:31
  • Explained below
    – Narzard
    May 11, 2016 at 13:14

1 Answer 1

8

To use unicode, add the code chcp 65001

This will change the code page. It stays that way until you close the window.

If you want to have this always run, (not necessarily recommended, because unicode can sometimes break batches), you can add a reg key string (reg_sz) to HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor and name it AutoRun. Change the value of it to chcp 65001. If you don't want to see the output message from the command, use @chcp 65001>nul instead.

1
  • 1
    Thx m8, put this as the answer. When i was searching around this is the best answer ever posted :)
    – user531558
    May 12, 2016 at 6:32

You must log in to answer this question.