请问这是怎么回事,该如何解决?望各位指点.......
要想在西文DOS下显示中文,这个技术属于C语言高级程序设计部分。而且必须要在图形模式下才能显示。意思就是说,把汉字当图形画出来。 下面是一个简单的例子 #include <stdio.h> #include <graphics.h>
char shen[]={ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00, 0x00,0x00,0x78,0x00,0x00,0x78,0x00,0x00, 0x00,0x00,0x3E,0x00,0x00,0x70,0x00,0x00, 0x00,0x00,0x1F,0x00,0x00,0x70,0x00,0x00, 0x00,0x00,0x0F,0x80,0x00,0x70,0x00,0x00, 0x00,0x00,0x03,0x80,0x00,0x70,0x00,0x00, 0x00,0x00,0x01,0x00,0x00,0x70,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x70,0x0F,0x00, 0x00,0x00,0x00,0x00,0x00,0x73,0xFF,0xC0, 0x00,0x00,0x06,0x00,0x01,0xFF,0x87,0xE0, 0x00,0x00,0x1F,0x87,0xFF,0xF0,0x03,0xE0, 0x00,0x00,0x7F,0xC3,0x80,0x70,0x03,0xC0, 0x00,0x07,0xFF,0x83,0x80,0x30,0x03,0xC0, 0x00,0x7F,0x1E,0x03,0x80,0x30,0x03,0xC0, 0x0F,0xF8,0x1E,0x03,0x80,0x30,0x03,0x80, 0x03,0xC0,0x1C,0x01,0x80,0x30,0x03,0x80, 0x00,0x00,0x38,0x01,0x80,0x31,0x83,0x80, 0x00,0x00,0x38,0x01,0x80,0x3F,0x83,0x00, 0x00,0x00,0x70,0x01,0x83,0xFE,0x07,0x00, 0x00,0x00,0x60,0x01,0x80,0x30,0x07,0x00, 0x00,0x00,0xE0,0x01,0x80,0x30,0x07,0x00, 0x00,0x01,0xF0,0x00,0xC0,0x30,0x06,0x00, 0x00,0x01,0xB3,0x80,0xC0,0x30,0x06,0x00, 0x00,0x03,0xB1,0xC0,0xC0,0x30,0x06,0x00, 0x00,0x07,0x30,0xC0,0xC0,0x30,0x0E,0x00, 0x00,0x0E,0x30,0x40,0xC0,0x30,0x0C,0x00, 0x00,0x0C,0x30,0x00,0xC0,0x3F,0xFC,0x00, 0x00,0x18,0x30,0x00,0xCF,0xFF,0x0C,0x00, 0x00,0x30,0x30,0x00,0x7E,0x70,0x00,0x00, 0x00,0x60,0x30,0x00,0x40,0x70,0x00,0x00, 0x00,0xC0,0x30,0x00,0x00,0x70,0x00,0x00, 0x01,0x80,0x30,0x00,0x00,0x70,0x00,0x00, 0x03,0x00,0x30,0x00,0x00,0x70,0x00,0x00, 0x04,0x00,0x30,0x00,0x00,0x70,0x00,0x00, 0x08,0x00,0x30,0x00,0x00,0x70,0x00,0x00, 0x00,0x00,0x30,0x00,0x00,0x70,0x00,0x00, 0x00,0x00,0x30,0x00,0x00,0x70,0x00,0x00, 0x00,0x00,0x30,0x00,0x00,0x70,0x00,0x00, 0x00,0x00,0x30,0x00,0x00,0x70,0x00,0x00, 0x00,0x00,0x30,0x00,0x00,0x70,0x00,0x00, 0x00,0x00,0x30,0x00,0x00,0x30,0x00,0x00, 0x00,0x00,0x70,0x00,0x00,0x30,0x00,0x00, 0x00,0x00,0x70,0x00,0x00,0x30,0x00,0x00, 0x00,0x00,0x70,0x00,0x00,0x30,0x00,0x00, 0x00,0x00,0x30,0x00,0x00,0x30,0x00,0x00, 0x00,0x00,0x30,0x00,0x00,0x30,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
void showhz(char *mat,int matsize,int x,int y,int color){ int i,j,k,n; n=(matsize-1)/8+1; for(j=0;j<matsize;j++) for(i=0;i<n;i++) for(k=0;k<8;k++) if(mat[j*n+i]&(0x80>>k)) putpixel(x+i*8+k,y+j,color); }
void main(){ int gd=DETECT,gm; int color=0; initgraph(&gd,&gm,""); setfillstyle(1,YELLOW); bar(0,0,640,480); showhz(shen,64,300,200,BLUE); showhz(shen,64,301,201,BLUE); getch(); closegraph(); }