I am finishing up a backup script for my peers to use while at work and I need assistance.
We are brazillian and as such, files and paths will be in Portuguese. This means I need Unicode characters like é, á, à, ç and the likes. For example: C:\Users\Usuário\Área de Trabalho
is a valid path.
If I open up a command prompt and type like that, it will accept the characters accordingly. However if I try to use the same characters in a batch script, I get strange characters.
In both cases, if I open up a command prompt and type chcp
, I get as response that it's using codepage 850
. If I put chcp
onto a batch file and run it, it gives the same response. So, in running a cmd
instance or a batch, the codepage used is the same, but the characters accepted are not.
If I open up cmd
or put in a script chcp 65001
(codepage of UTF-8), as soon as I type anything Unicode and press enter it closes the prompt window. I tried for example typing just echo é
and it was enough to crash cmd
.
I need to be able to read/write data with those characters. I am using Sublime Text to code.
How do I make this work?