pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16222: [[:print:]] doesn't correctly handle Emoji skin tone modifiers on MacOS
3+ messages / 3 participants
[nested] [flat]

* BUG #16222: [[:print:]] doesn't correctly handle Emoji skin tone modifiers on MacOS
@ 2020-01-21 17:16  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Bug reporting form @ 2020-01-21 17:16 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: mack@agilereasoning.com

The following bug has been logged on the website:

Bug reference:      16222
Logged by:          Mack Earnhardt
Email address:      mack@agilereasoning.com
PostgreSQL version: 11.6
Operating system:   MacOS Catalina
Description:        

On Linux heroku-18, these expressions both eval true:

select '✌'~'\A[[:print:]]*\Z';
select '✌🏻'~'\A[[:print:]]*\Z';

On MacOS Catalina, the 1st evals true but the 2nd evals false.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #16222: [[:print:]] doesn't correctly handle Emoji skin tone modifiers on MacOS
@ 2020-01-21 17:52  Tom Lane <tgl@sss.pgh.pa.us>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2020-01-21 17:52 UTC (permalink / raw)
  To: mack@agilereasoning.com; +Cc: pgsql-bugs@lists.postgresql.org

PG Bug reporting form <noreply@postgresql.org> writes:
> On Linux heroku-18, these expressions both eval true:

> select '✌'~'\A[[:print:]]*\Z';
> select '✌🏻'~'\A[[:print:]]*\Z';

> On MacOS Catalina, the 1st evals true but the 2nd evals false.

This is entirely a function of what your operating system's
locale support does.  So it could be that you chose the wrong
LC_CTYPE setting for the macOS database -- in C locale, for
example, "false" is the right answer.  However, we've observed
that macOS's UTF8-based locales seem pretty brain-dead about
handling of multibyte characters :-(.  So it's likely that this
boils down to being Apple's bug.  I haven't detected any interest
on their part in improving their POSIX locale support, unfortunately.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #16222: [[:print:]] doesn't correctly handle Emoji skin tone modifiers on MacOS
@ 2020-01-21 20:48  Mack Earnhardt <mack@agilereasoning.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Mack Earnhardt @ 2020-01-21 20:48 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org

Hi Tom,

You’re correct. I thought the fact that Terminal and Vim both display correct-ish was enough to rule out the OS. It wasn’t.

The database LC_CTYPE is set to en_US.UTF-8, as is my bash terminal. When I put the two queries in a text file and use `egrep '^[[:print:]]+$’`, only the first line is recognized.

Thanks for helping me narrow this down!

-M

> On Jan 21, 2020, at 12:52 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> PG Bug reporting form <noreply@postgresql.org> writes:
>> On Linux heroku-18, these expressions both eval true:
> 
>> select '✌'~'\A[[:print:]]*\Z';
>> select '✌🏻'~'\A[[:print:]]*\Z';
> 
>> On MacOS Catalina, the 1st evals true but the 2nd evals false.
> 
> This is entirely a function of what your operating system's
> locale support does.  So it could be that you chose the wrong
> LC_CTYPE setting for the macOS database -- in C locale, for
> example, "false" is the right answer.  However, we've observed
> that macOS's UTF8-based locales seem pretty brain-dead about
> handling of multibyte characters :-(.  So it's likely that this
> boils down to being Apple's bug.  I haven't detected any interest
> on their part in improving their POSIX locale support, unfortunately.
> 
> 			regards, tom lane






^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2020-01-21 20:48 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-01-21 17:16 BUG #16222: [[:print:]] doesn't correctly handle Emoji skin tone modifiers on MacOS PG Bug reporting form <noreply@postgresql.org>
2020-01-21 17:52 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-01-21 20:48   ` Mack Earnhardt <mack@agilereasoning.com>

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