LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 01-18-2005, 07:39 PM   #1
Hosiah
Member
 
Registered: Sep 2004
Location: Des Moines, Iowa
Distribution: Slackware, Mandriva, Debian derivatives, +BSD/ Solaris/ Minix/ plan9/ GNU/HURD...
Posts: 185

Rep: Reputation: 30
ncurses wide character/extended ASCII problem


OK, I've been driving myself dingy with this one.

I'm trying to get some (wide character, Unicode, extended ASCII, even just ring the dumbbell) character that extends beyond what you can type from the keyboard to display in ncurses.

For one thing, after fruitless attempts to use add_wch() and such, about which I have oodles of man pages and documentation about, I read my ncurses.h file and found no definition of any of the wide character functions or macros at all. I have version 5.3

Next, I've tried forgetting the curses and tried just getting any extended ASCII character with a printf("%c",n) call. All I get are ^C ^H control characters.

Now, I know the number one question, and yes, my hardware is fully capable of supporting extended characters, Unicode and all. How I found that out is by typing "cat /dev/random " at the prompt, and my terminal beeps some and floods with all kinds of foreign language doohickeys and pound signs and hearts,clubs,spades,and diamonds.....

So, my terminal can display them and my Linux is set up to know how. Why can't I?

For the record: I'm using Red Hat Linux 9.0, gcc compiler, and I'm only using the '-lcurses' option. Is there some other link I should use?
 
Old 04-11-2005, 06:54 AM   #2
Drunkalot
Member
 
Registered: Aug 2004
Distribution: Linux from Scratch
Posts: 69

Rep: Reputation: 15
Does you solve the problem??? I'm having the same problem, I try to make a box and the ascii character is code 205, but instead of printing the especial chareacter I'm getting an ...

This happens to any extended ascii character...

thx...
 
Old 04-14-2005, 06:25 AM   #3
Hosiah
Member
 
Registered: Sep 2004
Location: Des Moines, Iowa
Distribution: Slackware, Mandriva, Debian derivatives, +BSD/ Solaris/ Minix/ plan9/ GNU/HURD...
Posts: 185

Original Poster
Rep: Reputation: 30
No, I never solved it. I gave up! )-:

I did chase it all the way down to a bug report on Bugzilla, which is left unresolved to this day. I think we're going to have to wait for the ncurses maintainer to release a new version, which hopefully will address this issue.
 
Old 03-03-2009, 01:55 PM   #4
javicho
LQ Newbie
 
Registered: Mar 2009
Posts: 1

Rep: Reputation: 0
posible solucion EXTENDED ASCII

Hello!

I was trying with:

Code:
#include <ncurses.h>
#include <stdlib.h>

int main()
{
   unsigned short a;
   initscr();

   for (a=0;a<256;a++)
   {
      if ((a%13==0)&(a>1)) printw("\n");
      printw("%3d=",a);
      if ((a<10) || (a>13)) 
          {
          // mask the character with const A_ALTCHARSET
          addch(a+A_ALTCHARSET);}    
      else
          { printw(" ");}
      addch(ACS_VLINE);
   }

   getch();
   endwin();
   return;
}
Good Luck
Javicho

Last edited by javicho; 03-03-2009 at 01:59 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
extended ascii codes in c++ crAckZ Programming 1 09-12-2005 05:04 PM
extended ascii in kde bwysocki Programming 3 05-18-2005 01:19 PM
Extended ASCII set. exvor Programming 1 12-19-2004 03:44 PM
extended ascii in RH9 deleeuw Linux - Hardware 2 07-28-2003 11:08 AM
extended ascii in RH9 deleeuw Linux - General 0 07-18-2003 12:33 PM


All times are GMT -5. The time now is 08:34 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration