Re: broken table formatting in psql

John Naylor <john.naylor@enterprisedb.com>

From: John Naylor <john.naylor@enterprisedb.com>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-09-01T08:00:38Z
Lists: pgsql-hackers
On Thu, Sep 1, 2022 at 2:13 PM Pavel Stehule <pavel.stehule@gmail.com> wrote:
> problem is in bad width of invisible char 200E

I removed this comment in bab982161e since it didn't match the code.
I'd be interested to see what happened after v12.

- *       - Other format characters (general category code Cf in the Unicode
- *             database) and ZERO WIDTH SPACE (U+200B) have a column
width of 0.

UnicodeData.txt has this:

200B;ZERO WIDTH SPACE;Cf;0;BN;;;;;N;;;;;
200C;ZERO WIDTH NON-JOINER;Cf;0;BN;;;;;N;;;;;
200D;ZERO WIDTH JOINER;Cf;0;BN;;;;;N;;;;;
200E;LEFT-TO-RIGHT MARK;Cf;0;L;;;;;N;;;;;
200F;RIGHT-TO-LEFT MARK;Cf;0;R;;;;;N;;;;;

So maybe we need to take Cf characters in this file into account, in
addition to Me and Mn (combining characters).

-- 
John Naylor
EDB: http://www.enterprisedb.com



Commits

  1. Treat Unicode codepoints of category "Format" as non-spacing