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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-18-2005, 06:39 PM
|
#1
|
Member
Registered: Sep 2004
Location: Des Moines, Iowa
Distribution: Slackware, Mandriva, Debian derivatives, +BSD/ Solaris/ Minix/ plan9/ GNU/HURD...
Posts: 185
Rep:
|
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?
|
|
|
04-11-2005, 05:54 AM
|
#2
|
Member
Registered: Aug 2004
Distribution: Linux from Scratch
Posts: 69
Rep:
|
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...
|
|
|
04-14-2005, 05:25 AM
|
#3
|
Member
Registered: Sep 2004
Location: Des Moines, Iowa
Distribution: Slackware, Mandriva, Debian derivatives, +BSD/ Solaris/ Minix/ plan9/ GNU/HURD...
Posts: 185
Original Poster
Rep:
|
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.
|
|
|
03-03-2009, 12:55 PM
|
#4
|
LQ Newbie
Registered: Mar 2009
Posts: 1
Rep:
|
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 12:59 PM.
|
|
|
All times are GMT -5. The time now is 12:31 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|