Lower ASCII characters.

Hi,

I'm writing a BBS telnet program. I'm having issues with it not displaying lower ASCII characters. For example, instead of displaying the "smiley face" character (Ctrl-B), it displays ^B. Is this because i'm using Ncurses? If so, is there any way around this?

Thanks.

Control B in standard ASCII (STX) is decimal 02 or ^B according to the list of ASCII values. Not a smiley face.
Windows has different keyboard setups from UNIX. In UNIX they are called locales. What you see is standard, the Windows smiley or whatever is Windows only, for what you are doing.

I am assuming you are telnet to another unix box. If not, what you see when you type on a UNIX machine can be different in a DOS window. Telnet also responds to some keystrokes as well instead of just printing them. Be careful. Read your man page for telnet to see what keystrokes (or combinations) have meaning.

One way to get around this:
To get colors and other effects requires that the both terminals in the conversation use ANSI escape sequences:
Codes:
ansi codes
Getting terminal to work for you:
ANSI escape code - Wikipedia

Thank you for the quick reply. Remember that old DOS game, Kroz? The ASCII character that is the player, is the "smiley face" i'm referring to.

--- Post updated at 11:56 PM ---

And also, that "smiley face" i'm referring to, does display in Linux... Just not with my code.

Hi ignatius...
If I am reading your post correctly it seems you are expecting the built-in CP 437, default IBM CGA graphics card characters to work.
MS-DOS, IBM-DOS and others could access these and also DOS extended characters too but UNIX/Linux/Minix/OSX etc... are not the same animals.
The characters were also available on much, much later graphics cards but AFAIK they are not readily available via an 8 bit code page any more.

The industry has evolved from Code Pages to UNICODE so you will have to search for the characters under these conditions, IF, that is what you are after.
As Jim says the control characters do other things inside the *NIX environment.

To check the smiley face you see in Linux do this:
_Copy_the_graphic_ and do the next:
hexdump -C <<< _paste_the_graphic_ and enter it.
And post the results to let us see it.

Hope this helps.