Here's what I have now:
Code:
#include <stdio.h>
int main(void) {
// Card suits in black
char clubs[] = {0xE2, 0x99, 0xA7, 0};
char diamonds[] = {0xE2, 0x99, 0xA2, 0};
char hearts[] = {0xE2, 0x99, 0xA1, 0};
char spades[] = {0xE2, 0x99, 0xA4, 0};
printf("\n%s\n%s\n%s\n%s\n", clubs, diamonds, hearts, spades);
printf("\náàâãéèêíìîĩóòôõúùûũç\n\n");
printf("\nÁÀÂÃÉÈÊÍÌÎĨÓÒÔÕÚÙÛŨÇ\n\n");
return 0;
}
After setting GNOME Terminal to UTF-8, it works fine and it's simple enough for me to use it on my project. However, and as you can see on the code, there's a couple of printfs to check if I could save .c the file and change the terminal to UTF-8 and have everything I need to be outputted correctly. And it worked fine until another problem.
The thing is, I'm using the ncurses library and the above code in the curses mode outputs garbage in the first and third printfs (which are printws actually), the second one outputs fine, but not the others and I can't have that. I searched a bit and found something about ncursesw and tried to use that on the above code, but wasn't able to make it work.
Any ideas?