Make a simple program with Latin characters (Á, ò, ã) on Windows

I am trying to make a simple program for my father to see on Father's Day. And I want all the characters displayed correctly. I have full access to the computer where I want to run the program, and I can install anything on it. Here is my program:

#include <stdio.h>
int main(void)
{
    printf("Obrigado Dad, por tudo que tens suportado. És bom e misericordioso\n e tem sempre força para acabares tudo, porque eu não duvido que consegues.\nAmo-te.\nDanny\n");
    return 0;
}

The problem is that I cannot make Latin characters look as they should.

+4
source share
1 answer

If you use “Bitmap font” on cmd.exe, switch to the Unicode TrueType font (for example, “Lucida Console”) and, as indicated by Andrejs, save the source file in UTF8.

+2

All Articles