bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using UTF-8 Character question ...


From: Ben Duncan
Subject: Using UTF-8 Character question ...
Date: Fri, 02 Oct 2009 09:30:57 -0500
User-agent: Thunderbird 2.0.0.23 (X11/20090812)

In the function curs_border functions I would like to add my own
UTF-8 border characters. I see have defined some characters as

....

/* Thick Border Colors */

  wchar_t thk_boxupright [] = { 0x2513, 0x00 } ;
  wchar_t thk_boxupleft [] = { 0x250f, 0x00 } ;
  wchar_t thk_boxlowleft [] = { 0x2517, 0x00 } ;
  wchar_t thk_boxlowright [] = { 0x251B, 0x00 } ;
  wchar_t thk_vertline [] = { 0x2503, 0x00 } ;
  wchar_t thk_horzline [] = { 0x2501, 0x00 } ;

/* Thin Border Colors */

  wchar_t thn_boxupright [] = { 0x2510, 0x00 } ;
  wchar_t thn_boxupleft [] = { 0x250c, 0x00 } ;
  wchar_t thn_boxlowleft [] = { 0x2514, 0x00 } ;
  wchar_t thn_boxlowright [] = { 0x2518, 0x00 } ;
  wchar_t thn_vertline [] = { 0x2502, 0x00 } ;
  wchar_t thn_horzline [] = { 0x2500, 0x00 } ;

How do I go about changing the function defined as the following:

 wborder(WINDOW *win, chtype ls, chtype rs,
          chtype ts, chtype bs, chtype tl, chtype tr,
          chtype bl, chtype br);

to use UTF-8. Is it simply doing this :

 wborder(MyWin_ptr, thn_vertline, thn_vertline,
         thn_horzline, thn_horzline, thn_boxupleft,
         thn_boxupright, thn_boxlowleft, thn_boxlowright ) ;

My ncurses library is compile with UTF 8 defaults

As always, thanks ...

--
Ben Duncan - Business Network Solutions, Inc. 336 Elton Road  Jackson MS, 39212
"Never attribute to malice, that which can be adequately explained by stupidity"
       - Hanlon's Razor




reply via email to

[Prev in Thread] Current Thread [Next in Thread]