I tried to printf with some accented characters such as á é í ó ú:
printf(\"my name is Seán\\n\");
The text editor in
Windows console is generally considered badly broken regarding to character encodings. You can read about this problem here, for example.
The problem is that Windows generally uses the ANSI codepage (which is assuming you are in Western Europe or America Windows-1252), but the console uses the OEM codepage (CP850 under the same assumption).
You have several options:
CharToOem()). The drawback is that if the user redirects the output to a file (> file.txt) and opens the file with e.g. Notepad, he will see it wrong.chcp 1252.wprintf(): You need the TTF console font anyway.