-2

ASCII art in batch could look a lot nicer if their was a way to display things such as ░ without it interpreting it as odd symbols.

aschipfl
  • 33,626
  • 12
  • 54
  • 99
  • 1
    Does this answer your question? [how to print black charaters ascii in batch](https://stackoverflow.com/q/62030234) – aschipfl Dec 04 '20 at 09:52
  • Open a [command prompt](https://www.howtogeek.com/235101/), run `chcp` and look which [code page](https://en.wikipedia.org/wiki/Code_page) is set by default for your account according to country configured for your account. Then you can write the batch file using a [character encoding](https://en.wikipedia.org/wiki/Character_encoding) with same code page. If you use in the batch file `chcp 437 >nul` and use the characters encoded according to OEM [code page 437](https://en.wikipedia.org/wiki/Code_page_437), you can output an ASCII art with maximum compatibility, i.e. working on all Windows. – Mofi Dec 04 '20 at 11:43
  • @aschipfl yes but the main answer, [this](https://stackoverflow.com/a/62031389/13546037), only allows display since it call all lines starting with :::: – Victor Chavez Dec 05 '20 at 16:36
  • Well, since you provided no details at all, how could we know how you want to provide the ASCII/ANSI text? – aschipfl Dec 07 '20 at 10:32

1 Answers1

1

The typical way to achieve this is by changing the codepage using CHCP 65001 (other characters may require a different codepage).

An alternative for windows 10 users is to use console virtual terminal sequences which allows a limited selection of characters to be printed without changing codepage.

ESC(0 to enable draw character set, ESC(B to disable

@echo off & CLS
 for /F "delims=#" %%a in ('"prompt #$E# & for %%a in (1) do rem"') do set "\E=%%a"
<nul Set /P "=%\E%[1;1Hl%\E%[2;1Hm%\E%[1;2Hk%\E%[2;2Hj a f g j k l m n q t u v w x y z"
<nul Set /P "=%\E%(0%\E%[3;1Hl%\E%[4;1Hm%\E%[3;2Hk%\E%[4;2Hj a f g j k l m n q t u v w x y z %\E%(B"
<nul Set /P "=%\E%(0%\E%[6;4Ha%\E%[7;4Ha%\E%[5;5Hl%\E%[5;6Hw%\E%[5;7Hk%\E%[6;5Ht%\E%[6;6Hn%\E%[6;7Hu%\E%[6;8x%\E%[7;5Hm%\E%[7;6Hv%\E%[7;7Hj%\E%(B"

Output:

VT sequences

T3RR0R
  • 2,747
  • 3
  • 10
  • 25