Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unicode symbols in a batch file

Tags:

batch-file

If I type this command into a cmd: "echo █", then it displays the " █ " symbol. But if I type the command "echo █" into a batch (.bat) file I get what is shown in the pic below.

enter image description here

How do I fix it? I only need the " █ " symbol, but optionally I would also need: ◧ , ◙ , ▤ , ▣ , ⍁ , ⍂

like image 356
Mapenter Avatar asked Mar 16 '16 15:03

Mapenter


1 Answers

You can manually set the codepage to UTF-8 by typing chcp 65001 at the top of your batch file.

like image 50
niutech Avatar answered Oct 15 '22 14:10

niutech