Re: Unicode grapheme clusters

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Unicode grapheme clusters
Date: 2023-01-21 16:26:22
Message-ID: CAFj8pRCi_xBapoZNN6dQeugeAxrkN3r=Kd-FZHZzpWB2OBZVrQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

so 21. 1. 2023 v 17:21 odesílatel Greg Stark <stark(at)mit(dot)edu> napsal:

> On Fri, 20 Jan 2023 at 00:07, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
> wrote:
> >
> > I partially watch an progres in VTE - one of the widely used terminal
> libs, and I am very sceptical so there will be support in the next two
> years.
> >
> > Maybe the new microsoft terminal will give this area a new dynamic, but
> currently only few people on the planet are working on fixing or enhancing
> terminal's technologies. Unfortunately there is too much historical balast.
>
> Fwiw this isn't really about terminal emulators. psql is also used to
> generate text files for reports or for display in various ways.
>
> I think it's worth using whatever APIs we have available to implement
> better alignment for grapheme clusters and just assume whatever will
> eventually be used to display the output will display it "properly".
>
> I do not think it's worth trying to implement this ourselves if the
> libraries aren't there yet. And I don't think it's worth trying to
> adapt to the current state of the current terminal. We don't know that
> that's the only place the output will be viewed and it'll all be
> wasted effort when the terminals eventually implement full support.
>
> (If we were really crazy about this we could use terminal escape codes
> to query the current cursor position after emitting multicharacter
> graphemes. But as I said, I don't even think that would be useful,
> even if there weren't other reasons it would be a bad idea)
>

+1

Pavel

>
>
> --
> greg
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-01-21 16:30:08 Re: Unicode grapheme clusters
Previous Message Tom Lane 2023-01-21 16:24:01 Re: run pgindent on a regular basis / scripted manner