Re: Issue Supporting Emojis in Full Text Search on Ubuntu

From: Bzzzz <lazyvirus(at)gmx(dot)com>
To: pgsql-novice(at)lists(dot)postgresql(dot)org
Subject: Re: Issue Supporting Emojis in Full Text Search on Ubuntu
Date: 2020-07-01 22:31:16
Message-ID: 20200702003116.35644171@msi.defcon1.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Tue, 30 Jun 2020 20:27:23 -0400
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> With a non-C lc_ctype setting, which characters are considered to be
> letters is entirely up to the locale code supplied by the platform's
> libc. I duplicate your result that U+1F600 is not considered a letter
> by glibc, at least not with lc_ctype = en_US.utf8. (Perhaps there are
> other locale settings that would consider it a letter? Not my
> expertise though.)

FWIW, it works ferpectly with a french locale (on Debian buster):

test=# select datname, encoding, datcollate, datctype, datistemplate from
test-# pg_database;
datname | encoding | datcollate | datctype | datistemplate
---------------+----------+-------------+-------------+---------------
postgres | 6 | fr_FR.utf8 | fr_FR.utf8 | f
template1 | 6 | fr_FR.utf8 | fr_FR.utf8 | t
template0 | 6 | fr_FR.utf8 | fr_FR.utf8 | t
coshonet | 6 | fr_FR.UTF-8 | en_US.UTF-8 | f
ejabberd_test | 6 | fr_FR.UTF-8 | en_US.UTF-8 | f
fudforum | 6 | fr_FR.UTF-8 | en_US.UTF-8 | f
postfixadmin | 6 | fr_FR.UTF-8 | en_US.UTF-8 | f
test | 6 | fr_FR.UTF-8 | en_US.UTF-8 | f
testjy | 6 | fr_FR.UTF-8 | en_US.UTF-8 | f
zotonic | 6 | fr_FR.UTF-8 | fr_FR.UTF-8 | f
(10 rows)

test=# create table tst_ctrlu_chars(id varchar(12) primary key, a text);

test=# insert into tst_ctrlu_chars values ('ü', 'aaaaaaaaaaa'),
('ë','bbbbbbbbbb'),('ê','cccccccccc'),('û','dddddddd'),('😀','EEEEEEEE'),('🙉','FFFFFFFFF');
INSERT 0 6

test=# SELECT * FROM tst_ctrlu_chars WHERE id='😀';
id | a
----+----------
😀 | EEEEEEEE
(1 row)

My ¢0.2

Jiff

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Laurenz Albe 2020-07-02 07:43:53 Re: Issue Supporting Emojis in Full Text Search on Ubuntu
Previous Message Jordan Hurwich 2020-07-01 21:56:14 Re: Issue Supporting Emojis in Full Text Search on Ubuntu