就单纯的测试程序 gcc test.c -o test.cgi
源程序如下
#include <stdio.h>
int main (int argc,char *argv[])
{
printf("Content-Type:text/plain;charset=utf-8\n\n");
printf("hello world! \n");
return 0;
}
乱码情况如下

#include <stdio.h>
int main (int argc,char *argv[])
{
printf("Content-Type:text/plain;charset=utf-8\n\n");
printf("hello world! \n");
return 0;
}