pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matthias Apitz <guru@unixarea.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: sort order for UTF-8 char column with Japanese UTF-8
Date: Thu, 3 Feb 2022 20:11:35 +0100
Message-ID: <Yfwo54pi7mMGNVdI@pureos> (raw)
In-Reply-To: <253777.1643900437@sss.pgh.pa.us>
References: <YfurH8G4f00cWnu1@c720-r368166>
	<Yfuzr4wFtyTK9zFm@pureos>
	<253777.1643900437@sss.pgh.pa.us>

El día jueves, febrero 03, 2022 a las 10:00:37 -0500, Tom Lane escribió:

> Matthias Apitz <guru@unixarea.de> writes:
> > El día jueves, febrero 03, 2022 a las 11:14:55 +0100, Matthias Apitz escribió:
> >> With ESQL/C on a PostgreSQL 13.1 server I see the result of this query:
> >> select katkey,normform from swd_anzeige where normform >= 'A' ORDER BY ASC;
> >> coming out in this order:
> >> ...
> >> I loaded the same table in my server, but can't get the same order with
> >> psql:
> 
> Do the two machines produce the same results if you sort the data in
> question with sort(1)?  (Being careful to set LANG=de_DE.UTF-8 of
> course.)  I rather doubt this has anything to do with Postgres as such;
> there are lots of inter-system and inter-release discrepancies in
> collation behavior.

I've created a small text file 'swd' with some of the UTF-8 lines in
question. On my Linux mobile phone (a Debian Linux) it gives:

purism@pureos:~$ LANG=de_DE.UTF-8 sort swd
A
A010STRUKTUR
A010STRUKTUR
A010STRUKTUR
A0150SUPRALEITER
ゲアハルト・A・リッター
ゲルハルト・A・リッター
チャールズ・A・ビアード

On my FreeBSD laptop the same file sorts as

guru@c720-r368166:~ $ LANG=de_DE.UTF-8 sort swd
A
ゲアハルト・A・リッター
ゲルハルト・A・リッター
チャールズ・A・ビアード
A010STRUKTUR
A010STRUKTUR
A010STRUKTUR
A0150SUPRALEITER

I'll check tomorrow with the admins of the remote server (a SuSE Linux).

Thanks for the hint.

	matthias

-- 
Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub

Attachments:

  signature.asc (application/pgp-signature, 487B) download

view thread (7+ messages)  latest in thread

Message-ID: <Yfwo54pi7mMGNVdI@pureos>
Permalink:  ../Yfwo54pi7mMGNVdI@pureos/
Also on:    postgresql.org/message-id/Yfwo54pi7mMGNVdI@pureos

 · 

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-general@postgresql.org
  Cc: guru@unixarea.de, tgl@sss.pgh.pa.us
  Subject: Re: sort order for UTF-8 char column with Japanese UTF-8
  In-Reply-To: <Yfwo54pi7mMGNVdI@pureos>
  References: <YfurH8G4f00cWnu1@c720-r368166> <Yfuzr4wFtyTK9zFm@pureos> <253777.1643900437@sss.pgh.pa.us> <Yfwo54pi7mMGNVdI@pureos>

* 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