(PD)Curses wscanw doens't read space from keyboard & language issue
Here is my simple code.

    #include <curses.h>
    #include <stdio.h>
    #include <Windows.h>
    
    
    int main(int argc, char *argv[])
    {	WINDOW *my_win;
    	int startx, starty, width, height;
    	int i = 0;
    	char	chars[100];
    	
    	
    	initscr();			
    	cbreak();			
    						
    
    	height = 3;
    	width = 80;
    	starty = 22;	
    	startx = 0;	
    	
    	mvprintw(10,10,"Welcome to a PDcurses app.\n\t\t      Coded by AchE");
    	refresh();
    
    	
    	my_win = subwin(stdscr,height,width,starty,startx);
    	touchwin(my_win);
    
    	box(my_win, 0 , 0);		
    	wrefresh(my_win);
    
    	
    	nodelay(my_win, TRUE);	
    		
    
    	
    	wmove(my_win,1,1);
    	wrefresh(my_win);
    	for(;;){
    		if(wscanw(my_win,"%s",&chars) != ERR)
    		{
    			if(i!=1){
    			werase(stdscr);
    			i++;
    			}
    				
    			wprintw(stdscr,"%s\n",chars);
    			refresh();
    			werase(my_win);
    			box(my_win, 0 , 0);
    			memset(chars,0,sizeof(chars));
    			wmove(my_win,1,1);
    			wrefresh(my_win);
    		}
    		else{
    			printw("Error\n");
    		}
    	}
    		
    
    	endwin();			
    	return 0;
    }


What it does is to take users data from `my_win` window and print them in `stdscr`.

There are two problems.

1) if i type "Hello world!" , Only the word "Hello" will be printed. So..something is going wrong with spaces and `wscanw()`.

2) if i try to write something in another language than English, the program seems not to be able to read what i ve type and doesn't print them.

Any hint/help is welcomed
(PD)Curses wscanw doens't read space from keyboard & language issue
===

Here is my simple code.

    #include <curses.h>
    #include <stdio.h>
    #include <Windows.h>
    
    
    int main(int argc, char *argv[])
    {	WINDOW *my_win;
    	int startx, starty, width, height;
    	int i = 0;
    	char	chars[100];
    	
    	
    	initscr();			
    	cbreak();			
    						
    
    	height = 3;
    	width = 80;
    	starty = 22;	
    	startx = 0;	
    	
    	mvprintw(10,10,"Welcome to a PDcurses app.\n\t\t      Coded by AchE");
    	refresh();
    
    	
    	my_win = subwin(stdscr,height,width,starty,startx);
    	touchwin(my_win);
    
    	box(my_win, 0 , 0);		
    	wrefresh(my_win);
    
    	
    	nodelay(my_win, TRUE);	
    		
    
    	
    	wmove(my_win,1,1);
    	wrefresh(my_win);
    	for(;;){
    		if(wscanw(my_win,"%s",&chars) != ERR)
    		{
    			if(i!=1){
    			werase(stdscr);
    			i++;
    			}
    				
    			wprintw(stdscr,"%s\n",chars);
    			refresh();
    			werase(my_win);
    			box(my_win, 0 , 0);
    			memset(chars,0,sizeof(chars));
    			wmove(my_win,1,1);
    			wrefresh(my_win);
    		}
    		else{
    			printw("Error\n");
    		}
    	}
    		
    
    	endwin();			
    	return 0;
    }


What it does is to take users data from `my_win` window and print them in `stdscr`.

There are two problems.

1) if i type "Hello world!" , Only the word "Hello" will be printed. So..something is going wrong with spaces and `wscanw()`.

2) if i try to write something in another language than English, the program seems not to be able to read what i ve type and doesn't print them.

Any hint/help is welcomed