Displaying Extended ASCII

This is a discussion on Displaying Extended ASCII within the C Programming forums, part of the General Programming Boards category; Hello, I am writing a program with curses and I am wondering how can I output a character from the ...

  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    7

    Displaying Extended ASCII

    Hello,

    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
    Posts
    14,185
    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
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    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].

    --
    Mats
    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, 02: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, 09:12 AM

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