Special characters not displayed properly in "Run" window, and .exe app Follow
Special characters (polish special characters ę, ó, ą, ś, ł, ż, ź, ć, and █, ╗) are not displayed correctly in Run window, and in .exe application.
In IDE all characters are written correctly, but when i try to run the code I get different letters. Ex:
Ôľł instead of █,
ÔĽŚ instead of ╗,
─ś instead of Ę,
┼╗ instead of Ż.
I changed my code to be saved in UTF-8 format, I also changed file encoding to UTF-8 in CLion settings. Furthermore i worked on linux terminal previously and same code printf("█"); worked as intended there after changing source code format (textfile) to UTF-8. Did anybody encounter this issue, and if so, does anybody know how to fix it?
CLion build: 2022.3
Please sign in to leave a comment.
Fix: Set up windows console api to accept utf-8 code, using SetConsoleOutputCP().
Just in case, in CLion on Windows it's possible to launch the process in the external
cmd.execonsole by enabling the "Run in external console" option in the run/debug configuration. It can be a workaround for such issues.