For Big5 output from legacy softwate compatible, we have to assume the box drawing characters as full width (from patching screen and/or locale). However, this will breaks the ``real'' dialog, like dialog(1) under FreeBSD. This patch translate those ansi box drawing characters into poorman's drawing (using +, -, |). It will make my life easier. ref: http://www.robelle.com/smugbook/linedraw.html --- encoding.c.orig2 Thu May 18 23:15:45 2006 +++ encoding.c Thu May 18 23:24:42 2006 @@ -102,21 +102,21 @@ { 0x0067, 0x00B1 }, { 0x0068, 0x2424 }, { 0x0069, 0x240B }, - { 0x006a, 0x2518 }, - { 0x006b, 0x2510 }, - { 0x006c, 0x250C }, - { 0x006d, 0x2514 }, - { 0x006e, 0x253C }, + { 0x006a, 0x2b }, /* Lower right corner */ + { 0x006b, 0x2b }, /* Upper right corner */ + { 0x006c, 0x2b }, /* Upper left corner */ + { 0x006d, 0x2b }, /* Lower left corner */ + { 0x006e, 0x2b }, /* Cross center lines */ { 0x006f, 0x23BA }, { 0x0070, 0x23BB }, - { 0x0071, 0x2500 }, + { 0x0071, 0x2d }, /* Horizontal line */ { 0x0072, 0x23BC }, { 0x0073, 0x23BD }, - { 0x0074, 0x251C }, - { 0x0075, 0x2524 }, - { 0x0076, 0x2534 }, - { 0x0077, 0x252C }, - { 0x0078, 0x2502 }, + { 0x0074, 0x2b }, /* Left tee */ + { 0x0075, 0x2b }, /* Right tee */ + { 0x0076, 0x2b }, /* Bottom tee */ + { 0x0077, 0x2b }, /* Top tee */ + { 0x0078, 0x7c }, /* Vertical line */ { 0x0079, 0x2264 }, { 0x007a, 0x2265 }, { 0x007b, 0x03C0 },