pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Haotian Yang <yangnw@live.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: `pg_trgm` not recognizing Chinese characters in macOS
Date: Tue, 11 Sep 2018 09:20:13 -0400
Message-ID: <18165.1536672013@sss.pgh.pa.us> (raw)
In-Reply-To: <BN6PR18MB09323CCBF288EF650DCCF9E8AB040@BN6PR18MB0932.namprd18.prod.outlook.com>
References: <BN6PR18MB09323CCBF288EF650DCCF9E8AB040@BN6PR18MB0932.namprd18.prod.outlook.com>

Haotian Yang <yangnw@live.com> writes:
> Versions: macOS 10.13.6, PostgreSQL 10.5, pg_trgm 1.3.
> LC_ALL=en_US.UTF-8

pg_trgm relies on libc's functions (specifically, iswalpha()) to determine
what is a word character or not.  Unfortunately, the UTF8 locale support
in macOS is pretty incomplete, and I don't find it too surprising that
it's not recognizing Chinese characters as alphabetic.  Now, you could
make a good argument that they *shouldn't* be considered alphabetic in
an en_US locale; but I'm unsure whether switching to a more appropriate
locale will help.

Anyway, I'd first try zh_CN.UTF-8, and if that doesn't fix it, the place
to complain is https://bugreport.apple.com/ ... I'm sure they know about
it already, but the number of reports has an impact on how fast they
fix things.

			regards, tom lane




view thread (3+ messages)  latest in thread

Message-ID: <18165.1536672013@sss.pgh.pa.us>
Permalink:  ../18165.1536672013@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18165.1536672013@sss.pgh.pa.us

 · 

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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, yangnw@live.com
  Subject: Re: `pg_trgm` not recognizing Chinese characters in macOS
  In-Reply-To: <18165.1536672013@sss.pgh.pa.us>
  References: <BN6PR18MB09323CCBF288EF650DCCF9E8AB040@BN6PR18MB0932.namprd18.prod.outlook.com> <18165.1536672013@sss.pgh.pa.us>

* 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