Mapenter
Mapenter

Reputation: 245

Unicode symbols in a 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: ◧ , ◙ , ▤ , ▣ , ⍁ , ⍂

Upvotes: 20

Views: 16125

Answers (2)

niutech
niutech

Reputation: 29942

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

Upvotes: 37

Gregory Nikitas
Gregory Nikitas

Reputation: 491

This stackoverflow post may prove to be of use.

Remember to follow the instructions exactly.

In other words, when it says copy into the document, they mean copy the chars and paste it into your document. Don't just convert your original document.

Upvotes: 1

Related Questions