badly calculated width of emoji in psql

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: badly calculated width of emoji in psql
Date: 2021-04-02 08:45:21
Message-ID: CAFj8pRCeX21O69YHxmykYySYyprZAqrKWWg0KoGKdjgqcGyygg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

I am checked an query from
https://www.depesz.com/2021/04/01/waiting-for-postgresql-14-add-unistr-function/
article.

postgres=# SELECT U&'\+01F603';
┌──────────┐
│ ?column? │
╞══════════╡
│ 😃 │
└──────────┘
(1 row)

The result is not correct. Emoji has width 2 chars, but psql calculates
with just one char.

Regards

Pavel

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2021-04-02 09:03:21 Re: Fix pg_checksums progress report
Previous Message Fujii Masao 2021-04-02 08:29:26 Re: Data type correction in pgstat_report_replslot function parameters