Re: Unicode grapheme clusters - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: Unicode grapheme clusters
Date
Msg-id CAFj8pRC7N8ivZ+iKVXX5tj6HFCMbJEiEpOC7k8faS00M7KQ7Mw@mail.gmail.com
Whole thread Raw
In response to Re: Unicode grapheme clusters  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Unicode grapheme clusters
List pgsql-hackers


pá 20. 1. 2023 v 2:55 odesílatel Bruce Momjian <bruce@momjian.us> napsal:
On Thu, Jan 19, 2023 at 07:53:43PM -0500, Tom Lane wrote:
> Bruce Momjian <bruce@momjian.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@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

Embrace your flaws.  They make you human, rather than perfect,
which you will never be.


pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Adjust the description of OutputPluginCallbacks in pg-doc
Next
From: Peter Smith
Date:
Subject: Re: Logical replication timeout problem