You are not logged in.
Pages: 1
Hello I have batch file that contains the characters áéíóúü and ñ but when I use the echo command cmd displayes a different character than I would like how can I fix this thanks!
Offline
This a hacky way to do it that I use occaisionaly. Paste something like this directly into the cmd window -- don't run it as a script, for (hopefully) obvious reasons:
for %X in (a-acc:á e-acc:é i-acc:í o-acc:ó u-acc:ú u:uml:ü n-til:ñ) do (@echo:%X) >> international.txt
Open the resulting file in notepad or similar, then copy and paste the "actual" characters to your script in the appropriate places (they'll look wrong in the editor, but should be OK when you run the script).
There is probably a better way to do it with encoding settings in your text editor, but I don't often use international characters so never looked into it.
Last edited by bluesxman (20 Oct 2015 10:50)
cmd | *sh | ruby | chef
Offline
Thank you so much
Offline
It's usually a result of having a different code page in notepad vs command prompt. Personally, my cmd code page is 437, while my Windows code page is 1252. You may want to experiment with the CHCP command to see what works best for you.
Offline
Pages: 1