I want to output some special character graphics.
This is the topic:http://en.wikipedia.org/wiki/Code_page_437#Difference_from_ASCII
Here is the code I tried.It does not seem to achieve the desired effect:
#include
const long int Sigma=0x03A3; // Math symbol
const long int Smiley=0x263A; // Special graphic characters
void main(void)
{
printf("%x\n",Sigma); // it can't output graphics
printf("%x\n",Smiley);
}
Thank.


VulpesRank #55 · 29.2K reputationPosted Nov 28, 2013, 2:13 AM EST
Raster fonts don't (unless you use a very small font size) but Consolas and Lucida Console do.
You also need to use a code page which supports the characters you're interested in.
As you indicated in your post, code page 437 does supports some of the commoner Greek letters and code page 1253 supports them all.
So, if I change the font to Lucida console and the code page to 437 on my system (it's normally 850), the following prints a sigma:
To my knowledge, there is no way to print smileys to the console though you can get some 'smiley-like' characters with:
printf("%c", 1);
// or
printf("%c", 2);
Ken HRank #2,315 · 610 reputationPosted Nov 28, 2013, 7:11 PM EST
Thank for you.