Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old September 5th, 2008, 01:45 PM
Andrew Poelstra
Guest
 
Posts: n/a
Default Re: ASCII characters

On Fri, 2008-09-05 at 05:32 -0700, jt wrote:
Quote:
On Sep 5, 5:26 pm, Chris Dollin <chris.dol...@hp.comwrote:
Quote:
jt wrote:
Quote:
hello everyone..,
i'm using ubuntu 8.04 OS. I'm not able to output the non-printable
ascii chatacters.
for eg.
printf("%c",1); // nothing is outputted.....
Well, presumably it's called a non-printable character because it
doesn't have a printing representation.

What do you want to see if it's non-printable? Use `isprint` to
find out if its printable or not, then decide how you want to
display a non-printing character.

#include <ctype.h>

void printCharSomehow( unsigned char ch )
{
printf( (isprint( ch ) ? "'%c'" : "char(%d)"), ch );
}
please check the below link..i want to print those symbols..
http://didgood.com/programing/datath...scii-0-127.gif
Please don't quote signatures. I snipped Chris' for you.

You do what you want, you need to change your printing
charset to ASCII. Whether this is possible is specific
to your implementation, as are details about how to do
so. /Why/ you would ever need to do so is debatable.

--
Andrew Poelstra <apoelstra@wpsoftware.com>
To email me, change .net to .com in the above address.

  #2  
Old September 5th, 2008, 01:55 PM
Richard Bos
Guest
 
Posts: n/a
Default Re: ASCII characters

Andrew Poelstra <apoelstra@wpsoftware.netwrote:
Quote:
Please don't quote signatures. I snipped Chris' for you.
While we're on the meta stuff, your newsreader is removing References:
headers. This is Not Good.

Richard
  #3  
Old September 5th, 2008, 04:05 PM
Keith Thompson
Guest
 
Posts: n/a
Default Re: ASCII characters

Andrew Poelstra <apoelstra@wpsoftware.netwrites:
Quote:
On Fri, 2008-09-05 at 05:32 -0700, jt wrote:
[...]
Quote:
Quote:
>please check the below link..i want to print those symbols..
>http://didgood.com/programing/datath...scii-0-127.gif
>
[...]
Quote:
>
You do what you want, you need to change your printing
charset to ASCII. Whether this is possible is specific
to your implementation, as are details about how to do
so. /Why/ you would ever need to do so is debatable.
No, ASCII doesn't have a smiley at position 001. The cited table does
not accurately reflect the ASCII character set.

--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
  #4  
Old September 6th, 2008, 12:25 AM
Andrew Poelstra
Guest
 
Posts: n/a
Default Re: ASCII characters

On 2008-09-05, Richard Bos <rlb@hoekstra-uitgeverij.nlwrote:
Quote:
Andrew Poelstra <apoelstra@wpsoftware.netwrote:
>
Quote:
>Please don't quote signatures. I snipped Chris' for you.
>
While we're on the meta stuff, your newsreader is removing References:
headers. This is Not Good.
>
Thanks. I'll switch back to slrn (I was using Evolution and having
all sorts of minor problems, but this one takes the cake.)

--
Andrew Poelstra apoelstra@wpsoftware.com
To email me, use the above email addresss with .com set to .net
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,338 network members.