测试IDE是否有UTF-8编码
#include <stdio.h>
#include <stdlib.h>
int main(){
/*Test if the IDE has UTF-8 encoding*/
char * txt = "Á";
u_int8_t * txt_u8 = (u_int8_t *) txt;
if(txt_u8[0] != 0xc3 || txt_u8[1] != 0x81 || txt_u8[2] != 0x00) {
printf("The strings has no UTF-8 encoding. Some characters won't be displayed.\n");
}
else
{
printf("is utf-8\n");
}
return 0;
}