Re: sort order for UTF-8 char column with Japanese UTF-8

From: Matthias Apitz <guru(at)unixarea(dot)de>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: sort order for UTF-8 char column with Japanese UTF-8
Date: 2022-02-03 10:51:27
Message-ID: Yfuzr4wFtyTK9zFm@pureos
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

El día jueves, febrero 03, 2022 a las 11:14:55 +0100, Matthias Apitz escribió:

>
> Hello,
>
> 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:
>
> query: fetch swd_anzeige_seq
> RESULT: A
> query: fetch swd_anzeige_seq
> RESULT: ゲアハルト・A・リッター
> query: fetch swd_anzeige_seq
> RESULT: ゲルハルト・A・リッター
> query: fetch swd_anzeige_seq
> RESULT: チャールズ・A・ビアード
> query: fetch swd_anzeige_seq
> RESULT: A010STRUKTUR
> query: fetch swd_anzeige_seq
> RESULT: A010STRUKTUR
> query: fetch swd_anzeige_seq
> RESULT: A010STRUKTUR
> query: fetch swd_anzeige_seq
> RESULT: A0150SUPRALEITER
>
> I loaded the same table in my server, but can't get the same order with
> psql:
>
>
> katkey | normform
> --------+---------------------------------------------------------
> 233871 | A
> ...
> 92938 | ゲアハルト・A・リッター
> 92938 | ゲルハルト・A・リッター
> 92938 | リッター0ゲルハルト・A
>
> i.e. the Japanese rows are sorted at the end after all others. Why?
>

I forgot to say, both database have:

psql -l
...
ueisis | sisis | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 |

matthias
--
Matthias Apitz, ✉ guru(at)unixarea(dot)de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message aditya desai 2022-02-03 11:40:44 Increase fetch fize of oracl_fdw(ALTER SERVER)
Previous Message Matthias Apitz 2022-02-03 10:14:55 sort order for UTF-8 char column with Japanese UTF-8