ucs_wcwidth vintage

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: ucs_wcwidth vintage
Date: 2017-11-02 03:27:46
Message-ID: CAEepm=2Uxfr+in21aDmVke5eA8FBy-EPUFw4H59YSMirKULfCA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers,

src/backend/utils/mb/wchar.c contains a ~16 year old wcwidth
implementation that originally arrived in commit df4cba68, but the
upstream code[1] apparently continued evolving and there have been
more Unicode revisions since. It probably doesn't matter much: the
observation made by Zr40 in the #postgresql IRC channel that lead me
to guess that this code might be responsible is that emojis screw up
psql's formatting, since current terminal emulators recognise them as
double-width but PostgreSQL doesn't. Still, it's interesting that we
have artefacts deriving from various different frozen versions of the
Unicode standard in the source tree, and that might affect some proper
languages.

🤔

[1] http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c

--
Thomas Munro
http://www.enterprisedb.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2017-11-02 04:04:35 Re: Explicit relation name in VACUUM VERBOSE log
Previous Message Peter Eisentraut 2017-11-02 03:24:03 Re: list of credits for release notes