2

I would like to echo the unicode character "é" in cmd via running bat file. I prepared a short script:

@echo off SET message=Gép3 echo %message% pause 

how can I do that? Is there a possibility to put directly this letter into the code?

1
  • Press Alt + 232 on number pad number keys. Type charmap in Start Run dialog (Winkey + R). Select Dos Western Europe or whatever your region is. CMD use DOS character set. Commented Oct 27, 2016 at 9:32

1 Answer 1

4

Do this (both are important):

  • Use code page 65001 (UTF-8) chcp 65001
  • When you save your .bat file, use UTF-8

i. e. edit your example code in this way:

@echo off chcp 65001 SET message=Gép3 echo %message% pause 

Again, it is important that you save your .bat file with encoding UTF-8

Sign up to request clarification or add additional context in comments.

1 Comment

But that's unnecessary, and means it won't work on any other computer. Alt + 232 does what you want WITHOUT any changes to the environment.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.