What's the shortcut for getting the smiley face character?
I know if you hold down the Alt key and press 171, you get the half symbol.
Is there a website that lists all of the Alt Key shortcuts for special characters?
What's the shortcut for getting the smiley face character?
I know if you hold down the Alt key and press 171, you get the half symbol.
Is there a website that lists all of the Alt Key shortcuts for special characters?
I didn't see the smiley face and the heart, etc.
This code should show you all of the characters that weren't found at that website:
Code:#include <stdio.h> int main( void ) { int c; for (c = 0; c < 256; c++) printf ("%d %c\n", c, c); return 0; }
Blame that on your OS. They are not "the smiley face symbol", etc. They are actual values which end up being displayed incorrectly. Think of it as your computer trying to draw you a null character. Furthermore, it will depend on what font your terminal is using. One font gives you one thing for 'extended characters', another may give you something entirely different.
Quzah.
Hope is the first step on the road to disappointment.
It's not that they're extended, the VALUES are a part of ASCII (they are the beginning -- the first 32 of the ascii set), it's just that they don't have a direct character interpretation so it's up to the implementor to provide one (if they choose to do so). Extended refers to the values after the last defined value in ascii (127). Things like the smiley faces, hearts, clubs, musical notes, etc. are used to graphically represent in a single character things like "line feed," etc. that you wouldn't normally associate with a graphic.Originally posted by quzah
Furthermore, it will depend on what font your terminal is using. One font gives you one thing for 'extended characters', another may give you something entirely different.
So what it comes down to is your font set very-well may not even have a smiley face yet still be able to represent all ascii values (in fact, most modern fonts don't). It just happens that the default terminal font and many other older raster fonts started their own convention of representing these values as the smiley face and other symbols you may or may not be familiar with.
If you look at their original post, they specificly reference ALT+171. This is considered an "extended character", meaning it doesn't fall within the first 128 characters (0-127). That's what I was referring to for the extended characters.
But yes, the 0-32 aren't considered extended, they're just considered unprintable. This is the reason they give us nice little functions like isprint. (For the original poster's use/reference, not necessarily yours, as I doubt you need it.)
Quzah.
Hope is the first step on the road to disappointment.
32 is a space and it is printable.
Current projects:
1) User Interface Development Kit (C++)
2) HTML SDK (C++)
3) Classes (C++)
4) INI Editor (Delphi)
I said the first 32 not the first 3332 is a space and it is printable.
Remember that little number 0
I was refering to the quzah's reply. He wrote "0-32".
Current projects:
1) User Interface Development Kit (C++)
2) HTML SDK (C++)
3) Classes (C++)
4) INI Editor (Delphi)