Re: Unicode grapheme clusters

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

pá 20. 1. 2023 v 2:55 odesílatel Bruce Momjian <bruce(at)momjian(dot)us> napsal:

> On Thu, Jan 19, 2023 at 07:53:43PM -0500, Tom Lane wrote:
> > Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > > I am not sure what you are referring to above? character_length? I
> was
> > > talking about display length, and psql uses that --- at some point, our
> > > lack of support for graphemes will cause psql to not align columns.
> >
> > That's going to happen regardless, as long as we can't be sure
> > what the display will do with the characters --- and that's a
> > problem that will persist for a very long time.
> >
> > Ideally, yeah, it'd be great if all this stuff rendered perfectly;
> > but IMO it's so far outside mainstream usage of psql that it's
> > not something that could possibly repay the investment of time
> > to get even a partial solution.
>
> We have a few options:
>
> * TODO item
> * document psql works that way
> * do nothing
>
> I think the big question is how common such cases will be in the future.
> The report from 2022, and one from 2019 didn't seem to clearly outline
> the issue so it would good to have something documented somewhere.
>

There can be a note in psql documentation like "Unicode grapheme clusters
are not supported yet. It is not well supported by other necessary software
like terminal emulators and curses libraries".

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.

Regards

Pavel

> --
> Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
> EDB https://enterprisedb.com
>
> Embrace your flaws. They make you human, rather than perfect,
> which you will never be.
>
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2023-01-20 05:28:09 Re: Logical replication timeout problem
Previous Message Amit Kapila 2023-01-20 04:40:29 Re: Adjust the description of OutputPluginCallbacks in pg-doc