473,399 Members | 2,278 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Re: ASCII characters

On Fri, 2008-09-05 at 05:32 -0700, jt wrote:
On Sep 5, 5:26 pm, Chris Dollin <chris.dol...@hp.comwrote:
jt wrote:
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 <ap*******@wpsoftware.com>
To email me, change .net to .com in the above address.

Sep 5 '08 #1
3 1775
Andrew Poelstra <ap*******@wpsoftware.netwrote:
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
Sep 5 '08 #2
Andrew Poelstra <ap*******@wpsoftware.netwrites:
On Fri, 2008-09-05 at 05:32 -0700, jt wrote:
[...]
>please check the below link..i want to print those symbols..
http://didgood.com/programing/datath...scii-0-127.gif
[...]
>
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) ks***@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"
Sep 5 '08 #3
On 2008-09-05, Richard Bos <rl*@hoekstra-uitgeverij.nlwrote:
Andrew Poelstra <ap*******@wpsoftware.netwrote:
>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 ap*******@wpsoftware.com
To email me, use the above email addresss with .com set to .net
Sep 5 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

37
by: chandy | last post by:
Hi, I have an Html document that declares that it uses the utf-8 character set. As this document is editable via a web interface I need to make sure than high-ascii characters that may be...
4
by: wob | last post by:
Many thanks for those who responded to my question of "putting greek char into C string". In searching for an solution, I noticed that there are more than one version of "Extended ASCII...
3
by: JSM | last post by:
Hi, I am just trying to port an existing simple encryption routine to C#. this routine simply adds/substracts 10 ascii characters to each character in a text file (except quotes). The routine...
18
by: Ger | last post by:
I have not been able to find a simple, straight forward Unicode to ASCII string conversion function in VB.Net. Is that because such a function does not exists or do I overlook it? I found...
6
by: Friso Wiskerke | last post by:
Hi all, I'm creating a fixed length textfile with data which is sent out to a third-party which in turn reads the file and processes it. Some of the characters are not part of the lower ASCII...
18
by: John | last post by:
Hi, I'm a beginner is using C# and .net. I have big legacy files that stores various values (ints, bytes, strings) and want to read them into a C# programme so that I can store them in a...
399
by: =?UTF-8?B?Ik1hcnRpbiB2LiBMw7Z3aXMi?= | last post by:
PEP 1 specifies that PEP authors need to collect feedback from the community. As the author of PEP 3131, I'd like to encourage comments to the PEP included below, either here (comp.lang.python), or...
6
by: ssetz | last post by:
Hello, For work, I need to write a password filter. The problem is that my C+ + experience is only some practice in school, 10 years ago. I now develop in C# which is completely different to me....
4
by: meendar | last post by:
Hi, I am having a character pointer which contains ascii values. i just want to convert all these ascii values to respective characters and again store it in another character pointer. ...
9
by: =?Utf-8?B?RGFu?= | last post by:
I have the following code section that I thought would strip out all the non-ascii characters from a string after decoding it. Unfortunately the non-ascii characters are still in the string....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.