[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: changing default handling of line graphics mode
From: |
Mike Frysinger |
Subject: |
Re: changing default handling of line graphics mode |
Date: |
Fri, 19 Jan 2018 13:14:19 -0500 |
On 19 Jan 2018 04:33, Thomas Dickey wrote:
> ----- Original Message -----
> | From: "Mike Frysinger" <address@hidden>
> | To: address@hidden
> | Sent: Thursday, January 18, 2018 10:56:29 PM
> | Subject: changing default handling of line graphics mode
> |
> | currently ncurses treats terminals that don't support line drawing
> | modes as the degenerate case. but with the world moving to UTF-8
> | everywhere as the normal, can't we can flip this logic on its head?
> | specifically, if we detect that the current encoding supports UTF-8,
> | we simply use standard Unicode codepoints.
> |
> | terminals like mosh only run in UTF-8, and some are starting to
> | support DOCS to transition to a UTF-8-only mode on the fly:
> | https://www.cl.cam.ac.uk/~mgk25/unicode.html#term
> | -mike
> |
> | --- a/ncurses/tinfo/lib_setup.c
> | +++ b/ncurses/tinfo/lib_setup.c
> | @@ -611,8 +611,10 @@ _nc_locale_breaks_acs(TERMINAL *termp)
> | CONTROL_O(set_attributes)) {
> | result = 1;
> | }
> | - }
> | - }
> | + } else if (_nc_unicode_locale())
> | + result = 1;
> | + } else if (_nc_unicode_locale())
> | + result = 1;
> | returnCode(result);
> | }
>
> why should I add a bug to ncurses, to compensate for others' defects?
i don't see how trying to modernize terminals is a bug. if you know
the locale supports UTF-8 (and ncurses knows this), then why is it a
bug for ncurses to stick with only UTF-8 vs switching in/out of legacy
encodings ? seems to me it makes the system less complicated and more
robust. it's certainly simpler to write a single UTF-8 codepoint than
to juggle GL pointers via escape sequences.
-mike
signature.asc
Description: Digital signature