Thread: Displaying Extended ASCII

  1. #1
    Registered User
    Join Date
    Apr 2008

    Displaying Extended ASCII


    I am writing a program with curses and I am wondering how can I output a character from the extended ASCII set - like character 201, a corner?

    I have tried cut and paste from a word processor that shows them into my text editor (nvi, gvim), but the text editor doesn't display them properly (I get an upside down question mark).

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    You can use \x to express a character by its value, so 201 would probably be '\xc9'.

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Farncombe, Surrey, England
    That is probably because character 201 has different meaning in different code-pages.
    A code-page is the translation between character code [in this case 201] and the glyph [technical name for "some character or part of character", e.g. a corner piece of a box or an upside down question mark, etc, etc].

    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

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. Extended character ASCII in LINUX/WINDOWS
    By intmail in forum Linux Programming
    Replies: 2
    Last Post: 01-26-2006, 03:24 PM
  3. help! extended ascii table
    By godhand in forum Linux Programming
    Replies: 7
    Last Post: 10-07-2003, 05:20 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