Roy
unread,Jun 16, 2012, 3:49:37 AM6/16/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
an ugly hack from copying non-utf c < 0x80 part over if(in_utf()) c <
0x80 case enables linedraw in utf-8.
Index: terminal.c
===================================================================
--- terminal.c (revision 9566)
+++ terminal.c (working copy)
@@ -2687,9 +2687,46 @@
case 0:
if (c < 0x80) {
/* UTF-8 must be stateless so we ignore iso2022. */
- if (term->ucsdata->unitab_ctrl[c] != 0xFF)
+ /*if (term->ucsdata->unitab_ctrl[c] != 0xFF)
c = term->ucsdata->unitab_ctrl[c];
- else c = ((unsigned char)c) | CSET_ASCII;
+ else c = ((unsigned char)c) | CSET_ASCII;*/
+ if(term->sco_acs &&
+ (c!='\033' && c!='\012' && c!='\015' && c!='\b'))
+ {
+ if (term->sco_acs == 2) c |= 0x80;
+ c |= CSET_SCOACS;
+ } else {
+ switch (term->cset_attr[term->cset]) {
+ /*
+ * Linedraw characters are different from 'ESC ( B'
+ * only for a small range. For ones outside that
+ * range, make sure we use the same font as well as
+ * the same encoding.
+ */
+ case CSET_LINEDRW:
+ if (term->ucsdata->unitab_ctrl[c] != 0xFF)
+ c = term->ucsdata->unitab_ctrl[c];
+ else
+ c = ((unsigned char) c) | CSET_LINEDRW;
+ break;
+
+ case CSET_GBCHR:
+ /* If UK-ASCII, make the '#' a LineDraw Pound */
+ if (c == '#') {
+ c = '}' | CSET_LINEDRW;
+ break;
+ }
+ /*FALLTHROUGH*/ case CSET_ASCII:
+ if (term->ucsdata->unitab_ctrl[c] != 0xFF)
+ c = term->ucsdata->unitab_ctrl[c];
+ else
+ c = ((unsigned char) c) | CSET_ASCII;
+ break;
+ case CSET_SCOACS:
+ if (c>=' ') c = ((unsigned char)c) | CSET_SCOACS;
+ break;
+ }
+ }
break;
} else if ((c & 0xe0) == 0xc0) {
term->utf_size = term->utf_state = 1;