How to fix CMD accent error?

1

I'm having trouble displaying messages in cmd because the same ones when marked appear disfigured. This occurs in any language I use (C, C ++, .bat, etc).

For example instead of:

minha multiplicação é :

Appears:

Minha multiplica├º├úo ├® :

I wonder if there is any way to fix this with some specific Windows configuration for cmd .

Note: I use Windows 8. Configuring with chcp 1252 did not resolve the issue.

    
asked by anonymous 23.08.2016 / 14:04

1 answer

2

First of all: The problem seems to me in your code, not in CMD.

If you are going to make applications for the console, the most practical way is to change the encoding in your IDE / text editor to one that is compatible with the target OS instead of using UTF.

Your string is in UTF-8. In this case you should use:

chcp 65001

It is expected that encoding 1252 will not work for you.

    
23.08.2016 / 14:58