Writing unicode ncurses applications for busybox

Rich Felker dalias at libc.org
Wed Nov 19 05:03:57 UTC 2014


On Tue, Nov 18, 2014 at 12:47:36PM +0300, Pugnator wrote:
>  Hi all,
> I write ncurses based application which utilizes  russian characters. It looks like this:
> 
> wchar_t *unicode_string = L"Это юникод";
> mvwprintw(stdscr,1,5,"%ls", unicode_string);    
> 
> And it works pretty well on my desktop.
> I enabled all UNCIODE_ config options I found
> 
> I enabled terminal: export TERM="linux2.2"
> 
> I copied terminfo into my busybox system (kernel 3.2)
> When I run my application, only ascii is printed. Unicode chars are absent: no garbage or whatever.
> 
> How it can be workarounded if it is possible. Application is dynamically linked and all libraries were transferred too

Busybox has nothing to do with how your own applications behave,
unless they're calling out to the system utilities to do things. I
suspect either your libc (uclibc?) was built without locale/UTF-8
support, or your ncurses was built without wide character support. If
you're using Buildroot or a similar tool, it should offer you the
option to configure these aspects of the build.

Rich


More information about the busybox mailing list