X-Google-Language: ENGLISH,ASCII X-Google-Thread: f996b,8d14db4b24713566 X-Google-Attributes: gidf996b,public From: Shimrod Subject: Re: Looking for Chart of Ascii Characters Date: 1997/05/06 Message-ID: <336EF2BF.4CA3@wing.rug.nl>#1/1 X-Deja-AN: 239709420 References: <5khf5c$h31@reader.seed.net.tw> <336C6ED8.167EB0E7@sm.luth.se.nospam> To: sbaerman@erols.com Organization: http://huizen.dds.nl/~shimrod/ Newsgroups: alt.ascii-art Veronica Karlsson wrote: > >> >> JeePster (sbaerman@erols.com) wrote -- >> >>> I am in search of a chart that gives a list of all possible >>> characters within the text realm as well as the Exact keyboard >>> input required to >>> achieve this. An example of this would be a square. I stumbled >>> on this by chance. The keyboard input to achieve the �is 0911 >>> with the ALT key held down. I have seen quite a few others such >>> as a tre' kewl smiley face and a heart but I have yet to discover >>> the required typing need to produce them. >> > > Why not try the simple approach and write a small program that will go > through the numbers 0 to 255 (or 127) and try to write them both as > numbers and as characters and see what happens... > > I have written a small C program that does that (how you compile it > is different on different computers. On the unix system here at my > school write gcc program_name.c -o program_name ) > > [begin C program code example 1] > > #include > #include > > main() > { > int i; > > for (i = 0; i <= 255; i++) > { printf("%d %c\n", i, i); > } > } > > [end C program code example 1] > > If you prefer to have the numbers as hexadecimal instead of decimal you > can use this code: > > [begin C program code example 2] > > #include > #include > > main() > { > int i; > > for (i = 0; i <= 255; i++) > { printf("%0x %c\n", i, i); > } > } > > [end C program code example 2] > > (after a couple of tries you may find it necessary to "screen out" > some numbers by "counting past" them. In the example below I have > screened out number 15: > > [begin C program code example 3] > > #include > #include > > main() > { > int i; > > for (i = 0; i <= 255; i++) > { if (i == 15) i++; /* don't show number 15 */ > printf("%d %c\n", i, i); > } > } > > [end C program code example 3] > > when I run this the program will show the numbers ...13, 14, 16, > 17...) > > I hope this helps. > > -- > :) > Veronica Karlsson > (e93-vkn@sm.luth.se http://www.ludd.luth.se/~vk/ ) > (llizard's animation site: http://jota.sm.luth.se:80/~e93-vkn/docs/ ) Instead of screening out certain numbers, you might also just start at 32, anything below that is a control character. You might as well stop at 127 too, since that's where ascii ends, anything above that will show different characters on different systems (DOS or UNIX). Here's a program that does exactly the same as the above, but in pascal: [begin pascal source] program show_chars(input,output); var x : integer; begin for x := 32 to 255 do begin writeln(x,' ',chr(x)); end; end. [end pascal source] On my unix sys I compile this with: pc progname.p -o progname When running TurboPascal, you might need to include something. -- _____ _ _ _ ,-'`. | __| |_|_|_____ ___ ___ _| | _ _ _ _ ___ ,'`.,-'`. |__ | | | | _| . | . | | \ / \ |\| ' | /`.,'`.,-'`. |_____|_|_|_|_|_|_|_| |___|___| |_/ \_/ | | | (`./`-,'`.,-'`. _ _ _ _ _ _ \.\.( `,'`.,-' Herman Hiddema |_) /| |\| | / ` )`\ |.|`,' Venuslaan 147 c | /"| | | | \_, ,' \/`) /.| 9742 KN Groningen ,-'"`-. / \,'\/`( ( The Netherlands //// / @ @ \ \\\\ \,'`./`./`.\ tel. 050-5775373 \ :=| ,._,. |=: / \ ,'\ /\ ) mailto:csg824@wing.rug.nl || ,\ \_../ /. || \ ,; \,' http://huizen.dds.nl/~shimrod/ ||','`-._))'`.`|| `: \.' `-' (/ `-' `./ Now there's a man who knows where his towel is!