Thread: help! extended ascii table

  1. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    31

    help! extended ascii table

    Hi, would anyone please tell me how can download the extended ascii table to my Debian linux? thanks

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    http://www.asciitable.com/

    What exactly are you after?
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Comment your source code! Lynux-Penguin's Avatar
    Join Date
    Apr 2002
    Posts
    533
    download an extended ascii table???
    uh--

    just run this:
    Code:
    #include <stdio.h>
    int main()
    {
    	int j;
    	printf("+---+--------+\n| C | Code   |\n+---+--------+\n");
    	for(j=0;j<256;j++)
    		printf("| %c | %6d |\n+---+--------+\n",(char)j,j);
    	return 0;
    }
    and you can pipe it however you want.

    there's your ascii table for whatever system you're on...

    -LC
    Asking the right question is sometimes more important than knowing the answer.
    Please read the FAQ
    C Reference Card (A MUST!)
    Pointers and Memory
    The Essentials
    CString lib

  4. #4
    Registered User
    Join Date
    Jun 2003
    Posts
    31
    it's just that when I try to do printf("%c", 128 or above) my system doesn't display the character.

  5. #5
    Comment your source code! Lynux-Penguin's Avatar
    Join Date
    Apr 2002
    Posts
    533
    what system?

    I'm pretty sure it does display it, but its an escape sequence or something that you can't visibly see as a char.

    BSD right?

    -LC
    Asking the right question is sometimes more important than knowing the answer.
    Please read the FAQ
    C Reference Card (A MUST!)
    Pointers and Memory
    The Essentials
    CString lib

  6. #6
    root
    Join Date
    Sep 2003
    Posts
    232
    >I'm pretty sure it does display it, but its an escape sequence or something that you can't visibly see as a char.
    That's why you add the following clause:
    Code:
    if (!isprint(j))
      printf("| %#x | %6d |\n+---+--------+\n",(char)j,j);
    else
      printf("| %c | %6d |\n+---+--------+\n",(char)j,j);
    The information given in this message is known to work on FreeBSD 4.8 STABLE.
    *The above statement is false if I was too lazy to test it.*
    Please take note that I am not a technical writer, nor do I care to become one.
    If someone finds a mistake, gleaming error or typo, do me a favor...bite me.
    Don't assume that I'm ever entirely serious or entirely joking.

  7. #7
    Registered User
    Join Date
    Jun 2003
    Posts
    31
    The system is Debian.

  8. #8
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,534
    Is the extended ascii table something different than what you could view if you did

    man ascii?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Extended ASCII Characters in an RTF Control
    By JustMax in forum C Programming
    Replies: 18
    Last Post: 04-03-2009, 08:20 PM
  2. Writing array, to file
    By zootreeves in forum C Programming
    Replies: 9
    Last Post: 09-08-2007, 05:06 PM
  3. Extended character ASCII in LINUX/WINDOWS
    By intmail in forum Linux Programming
    Replies: 2
    Last Post: 01-26-2006, 03:24 PM
  4. ASCII extended
    By arlenagha in forum Linux Programming
    Replies: 1
    Last Post: 05-14-2003, 01:15 PM
  5. Printing extended ASCII characters
    By Jonny M in forum C Programming
    Replies: 2
    Last Post: 03-01-2002, 10:12 AM