1

I don't know how to output the Euro symbol in a C99 Project, I am using CLion to develop the project and I'm using MinGW as Toolchain (I don't know if that matters).

I already searched a lot and I can't find any answer to my problem, hope someone can help me.

I already tried to do this

printf("€");
printf("\u20AC");

The output is Ôé¼, but I'm expecting .

Michele Dorigatti
  • 811
  • 1
  • 9
  • 17
João Neves
  • 77
  • 1
  • 10

1 Answers1

0

A simple way to do it is using the UTF-8 as native encoding. Just print like this:

#include <stdio.h>

int main()
{
    printf("\xE2\x82\xAC");

    return 0;
}

You can find a useful link to Euro Sign here