Thread: ASCII extended

  1. #1
    Registered User
    Join Date
    Mar 2003

    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
    You can output them as hex to see their values.

    cout <<hex <<c;
    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, 03: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, 10:12 AM