I am looking for a way of printing characters which are represented in UTF-8 as an array of bytes. I've found this approach (below), but I didn't get the expected result あ. Instead of it, I got Russian letters уБВ.
#include <stdio.h>
#include <conio.h>
int main()
{
char s[]={0xe3,0x81,0x82, 0x00};
printf("%s",s);
_getch();
return 0;
}
Could you kindly advise me the best way of printing utf-8 strings in console? (It is necessary for parsing asn.1 utf-8 strings.)