pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jacob Champion <pchampion@vmware.com>
To: john.naylor@enterprisedb.com <john.naylor@enterprisedb.com>
To: pavel.stehule@gmail.com <pavel.stehule@gmail.com>
Cc: laurenz.albe@cybertec.at <laurenz.albe@cybertec.at>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: michael@paquier.xyz <michael@paquier.xyz>
Cc: horikyota.ntt@gmail.com <horikyota.ntt@gmail.com>
Subject: Re: badly calculated width of emoji in psql
Date: Thu, 12 Aug 2021 16:54:02 +0000
Message-ID: <bedc833c3f60bbcd72ce613fc6a677be609d19dd.camel@vmware.com> (raw)
In-Reply-To: <CAFBsxsEW0oAD2gdWQ9OQ8dS52iz476kWK2pqV1xmGuVjaygZTA@mail.gmail.com>
References: <CAFj8pRCeX21O69YHxmykYySYyprZAqrKWWg0KoGKdjgqcGyygg@mail.gmail.com>
	<1f89b5e9624e08f1f06d7272bc880961860ff378.camel@cybertec.at>
	<CAFj8pRDuNNPJ-Xzd8ZC3dF4pbOsAZAH-zbA0Y65uivTZ2zT1ZQ@mail.gmail.com>
	<20210405.140718.90372987296815422.horikyota.ntt@gmail.com>
	<9e3c847108bac6041f50e86d08d8835f5cf7cd78.camel@vmware.com>
	<YPUtzT0J8cZByTkD@paquier.xyz>
	<f6a06ecdf378b50ed871e363aa9ac7e706101ab6.camel@cybertec.at>
	<c2a556a0158b642d6c597508d2a47059091e4d56.camel@vmware.com>
	<2f7ca10c7847f69267685beca7b5aa92dd876259.camel@vmware.com>
	<CAFj8pRCuaHgxa8M_FxmhGDg46qWp4yF-Xz_Xkj5NZT-F9fkQ1w@mail.gmail.com>
	<CAFBsxsEW0oAD2gdWQ9OQ8dS52iz476kWK2pqV1xmGuVjaygZTA@mail.gmail.com>

On Thu, 2021-08-12 at 12:36 -0400, John Naylor wrote:
> I tried this patch on and MacOS11/iterm2 and RHEL 7 (ssh'd from the Mac, in case that matters) and the example shown at the top of the thread shows no difference:
> 
> john.naylor=# \pset border 2
> Border style is 2.
> john.naylor=# SELECT U&'\+01F603';
> +----------+
> | ?column? |
> +----------+
> | 😃        |
> +----------+
> (1 row)
> 
> (In case it doesn't render locally, the right bar in the result cell is still shifted to the right.
> 
> What is the expected context to show a behavior change?

There shouldn't be anything special. (If your terminal was set up to
display emoji in single columns, that would cause alignment issues, but
in the opposite direction to the one you're seeing.)

> Does one need some specific terminal or setting?

In your case, an incorrect number of spaces are being printed, so it
shouldn't have anything to do with your terminal settings.

Was this a clean build? Perhaps I've introduced (or exacerbated) a
dependency bug in the Makefile? The patch doing nothing is a surprising
result given the code change.

--Jacob


view thread (37+ messages)  latest in thread

Message-ID: <bedc833c3f60bbcd72ce613fc6a677be609d19dd.camel@vmware.com>
Permalink:  ../bedc833c3f60bbcd72ce613fc6a677be609d19dd.camel@vmware.com/
Also on:    postgresql.org/message-id/bedc833c3f60bbcd72ce613fc6a677be609d19dd.camel@vmware.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: pchampion@vmware.com, john.naylor@enterprisedb.com, pavel.stehule@gmail.com, laurenz.albe@cybertec.at, michael@paquier.xyz, horikyota.ntt@gmail.com
  Subject: Re: badly calculated width of emoji in psql
  In-Reply-To: <bedc833c3f60bbcd72ce613fc6a677be609d19dd.camel@vmware.com>
  References: <CAFj8pRCeX21O69YHxmykYySYyprZAqrKWWg0KoGKdjgqcGyygg@mail.gmail.com> <1f89b5e9624e08f1f06d7272bc880961860ff378.camel@cybertec.at> <CAFj8pRDuNNPJ-Xzd8ZC3dF4pbOsAZAH-zbA0Y65uivTZ2zT1ZQ@mail.gmail.com> <20210405.140718.90372987296815422.horikyota.ntt@gmail.com> <9e3c847108bac6041f50e86d08d8835f5cf7cd78.camel@vmware.com> <YPUtzT0J8cZByTkD@paquier.xyz> <f6a06ecdf378b50ed871e363aa9ac7e706101ab6.camel@cybertec.at> <c2a556a0158b642d6c597508d2a47059091e4d56.camel@vmware.com> <2f7ca10c7847f69267685beca7b5aa92dd876259.camel@vmware.com> <CAFj8pRCuaHgxa8M_FxmhGDg46qWp4yF-Xz_Xkj5NZT-F9fkQ1w@mail.gmail.com> <CAFBsxsEW0oAD2gdWQ9OQ8dS52iz476kWK2pqV1xmGuVjaygZTA@mail.gmail.com> <bedc833c3f60bbcd72ce613fc6a677be609d19dd.camel@vmware.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox