Ncurses since version-5.3 has functions for setting the borders of a window specifically accepting wide (unicode) characters, called:
int border_set( const cchar_t *ls, const cchar_t *rs, const cchar_t *ts, const cchar_t *bs, const cchar_t *tl, const cchar_t *tr, const cchar_t *bl, const cchar_t *br );
int wborder_set( WINDOW *win, const cchar_t *ls, const cchar_t *rs, const cchar_t *ts, const cchar_t *bs, const cchar_t *tl, const cchar_t *tr, const cchar_t *bl, const cchar_t *br);
The border_set and wborder_set functions draw a border around the edges of the current or specified window. These functions do not change the cursor position, and do not wrap.
which use cchar_t
:
cchar_t
References a string of wide characters (___source___)
#define CCHARW_MAX 5
typedef struct
{
attr_t attr;
wchar_t chars[CCHARW_MAX];
}
cchar_t;
instead of the chtype
which border
and wborder
functions use.