'VS code does not recognise letters Õ, Ä, Ö, Ü but encoding is UTF-8

I have been coding in English so far but now it is necessary to code in my native language which is Estonian. We have letters like Õ, Ä, Ö and Ü but VS code does not seem to like them that much.

Here is an example code and also output:

#include <stdio.h>

int main()
{
    printf("Tegu on sõna äraarvamise mänguga\n"); 
}

The output would in my case be:

Tegu on s├Ána ├ñraarvamise m├ñnguga

What can I do to fix this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source