ASCII extended

This is a discussion on ASCII extended within the Linux Programming forums, part of the Platform Specific Boards category; i need to print extended ASCII characters, such as '\xEA' or '\x02', in the console . i've tried char and ...

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    3

    ASCII extended

    i need to print extended ASCII characters, such as '\xEA' or '\x02', in the console . i've tried char and wchar_t with cout but can't get them to display the right character. i either get ? marks. now i am trying ncurses but with same result(?).
    i am running Redhat 8, is it possible to show these extended characters in the console just <iostream>. ?

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    You can output them as hex to see their values.

    cout <<hex <<c;
    or
    printf ("%x", c);

    As for printing them, they're in the non-printable range, so you're going to have a job doing so. You might find that some are mapped to something sensible looking if you're lucky.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

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. Displaying Extended ASCII
    By JMJ_coder in forum C Programming
    Replies: 2
    Last Post: 10-07-2008, 08:35 AM
  3. Extended character ASCII in LINUX/WINDOWS
    By intmail in forum Linux Programming
    Replies: 2
    Last Post: 01-26-2006, 02:24 PM
  4. help! extended ascii table
    By godhand in forum Linux Programming
    Replies: 7
    Last Post: 10-07-2003, 05:20 PM
  5. Printing extended ASCII characters
    By Jonny M in forum C Programming
    Replies: 2
    Last Post: 03-01-2002, 09:12 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21