I've been tried to print Extended ASCII characters:
http://www.theasciicode.com.ar/
But all those symbols were printed as question-character on the white background ?
.
I use the following cycle to print that symbols:
for (i = 0; i <= 30; i++)
printf("%c", 201);
Question: Is there any way to print those Extended ASCII characters or not? Or maybe there is special library for these characters?
OS Linux Ubuntu 13.04, Code::Blocks 12.11 IDE.
On a standard 101 keyboard, special extended ASCII characters such as é or ß can be typed by holding the ALT key and typing the corresponding 4 digit ASCII code. For example é is typed by holding the ALT key and typing 0233 on the keypad.
To insert an ASCII character, press and hold down ALT while typing the character code. For example, to insert the degree (º) symbol, press and hold down ALT while typing 0176 on the numeric keypad. You must use the numeric keypad to type the numbers, and not the keyboard.
A set of codes that extends the basic ASCII set. The basic ASCII set uses 7 bits for each character, giving it a total of 128 unique symbols. The extended ASCII character set uses 8 bits, which gives it an additional 128 characters.
Extended ASCII, as the eight-bit code is known, was introduced by IBM in 1981 for use in its first PC, and it soon became the industry standard for personal computers. In extended ASCII, 32 code combinations are used for machine and control commands, such as…
It's better to use unicode than extended ASCII, which is non-standard. A thread about printing unicode characters in C : printing-utf-8-strings-with-printf-wide-vs-multibyte-string-literals
But indeed you need to copy paste unicode characters..
A better way to start:
#include <stdio.h>
int main() {
printf("\u2500\u2501\n");
}
See https://en.wikipedia.org/wiki/Box-drawing_character#Unicode for unicode characters for this extended ASCII style box art..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With