Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nZLqs-0003mb-Ai for pgsql-admin@arkaria.postgresql.org; Wed, 30 Mar 2022 00:06:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nZLqp-0007Xw-VU for pgsql-admin@arkaria.postgresql.org; Wed, 30 Mar 2022 00:06:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nZLqp-0007Xn-Ki for pgsql-admin@lists.postgresql.org; Wed, 30 Mar 2022 00:06:15 +0000 Received: from inet-gw.ndensan.co.jp ([192.47.64.84]) by magus.postgresql.org with smtp (Exim 4.92) (envelope-from ) id 1nZLqk-0003da-FU for pgsql-admin@lists.postgresql.org; Wed, 30 Mar 2022 00:06:14 +0000 From: =?UTF-8?B?6I2S5LqV5YWD5oiQ?= To: "'Holger Jakobs'" Cc: References: <8cbb85bf50e6354095b09548a54ec1d8@ndensan.co.jp> In-Reply-To: <8cbb85bf50e6354095b09548a54ec1d8@ndensan.co.jp> Subject: RE: Re: About Unicode IVS Date: Wed, 30 Mar 2022 09:06:06 +0900 Message-ID: <001801d843c9$f39d4f10$dad7ed30$@ndensan.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 thread-index: AQHg0FDR+HndrFh/LBHUTHyc0s3IH6zF8vdg Content-Language: ja List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Variant forms cannot be solved by normalization. Moto. -------- =E5=85=83=E3=81=AE=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8 = -------- =E4=BB=B6=E5=90=8D: Re: About Unicode IVS =E6=97=A5=E4=BB=98: 2022-03-29 19:02 =E7=99=BA=E4=BF=A1=E8=80=85: Holger Jakobs =E5=AE=9B=E5=85=88: pgsql-admin@lists.postgresql.org It's totally correct that the two characters are still two characters. You would have to normalize the string first, so that the combination = becomes one character. More information about this topic, which is in part beyond PostgreSQL: * https://stackoverflow.com/questions/7931204/what-is-normalized-utf-8-all-= about [1] * https://en.wikipedia.org/wiki/Unicode_equivalence [2] Regards, Holger Am 29.03.22 um 11:55 schrieb =E8=8D=92=E4=BA=95=E5=85=83=E6=88=90: > thank you for your reply. >=20 > Changing the collation order and CTYPE did not change the behavior. >=20 > =E5=90=8D=E5=89=8D | =E6=89=80=E6=9C=89=E8=80=85 | = =E3=82=A8=E3=83=B3=E3=82=B3=E3=83=BC=E3=83=87=E3=82=A3=E3=83=B3=E3=82=B0 = | =E7=85=A7=E5=90=88=E9=A0=86=E5=BA=8F > | Ctype(=E5=A4=89=E6=8F=9B=E6=BC=94=E7=AE=97=E5=AD=90) | = =E3=82=A2=E3=82=AF=E3=82=BB=E3=82=B9=E6=A8=A9=E9=99=90 >=20 >=20 -----------+---------+------------------+-------------+------------------= -+--------------------- >=20 >=20 > D209007 | D209007 | UTF8 | C | C > | >=20 > postgres | D209007 | UTF8 | C | C > | >=20 > template0 | D209007 | UTF8 | C | C > | =3Dc/D209007 + >=20 > | | | | > | D209007=3DCTc/D209007 >=20 > template1 | D209007 | UTF8 | C | C > | =3Dc/D209007 + >=20 > | | | | > | D209007=3DCTc/D209007 >=20 > template2 | D209007 | UTF8 | ja_JP.UTF-8 | ja_JP.UTF-8 > | >=20 > (5 =E8=A1=8C) >=20 > D209007=3D# c template2 >=20 >=20 =E3=83=87=E3=83=BC=E3=82=BF=E3=83=99=E3=83=BC=E3=82=B9"template2"=E3=81=AB= =E3=83=A6=E3=83=BC=E3=82=B6"D209007"=E3=81=A8=E3=81=97=E3=81=A6=E6=8E=A5=E7= =B6=9A=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82 >=20 >=20 > template2=3D# select char_length(U&'+0000E6' || U&'+000300'); >=20 > char_length >=20 > ------------- >=20 > 2 >=20 > (1 =E8=A1=8C) >=20 > template2=3D# select char_length(U&'+008FBA' || U&'+0E0102'); >=20 > char_length >=20 > ------------- >=20 > 2 >=20 > (1 =E8=A1=8C) >=20 > template2=3D# select length(U&'+008FBA' || U&'+0E0102'); >=20 > length >=20 > -------- >=20 > 2 >=20 > (1 =E8=A1=8C) >=20 > Moto. >=20 > FROM: Michel SALAIS > SENT: Tuesday, March 29, 2022 6:35 PM > TO: '=E8=8D=92=E4=BA=95=E5=85=83=E6=88=90' ; = 'David G. Johnston' > > CC: pgsql-admin@lists.postgresql.org > SUBJECT: RE: About Unicode IVS >=20 > Hi, >=20 > I think this has something to do with collation and ctype. As I see=20 > you have it set to =E2=80=9CC=E2=80=9D for all your databases (even if = I don=E2=80=99t=20 > understand your titles =F0=9F=98=8A). >=20 > _Michel SALAIS_ >=20 > _ _ >=20 > DE : =E8=8D=92=E4=BA=95=E5=85=83=E6=88=90 > ENVOY=C3=89 : mardi 29 mars 2022 06:35 > =C3=80 : 'David G. Johnston' CC :=20 > pgsql-admin@lists.postgresql.org OBJET : RE: About Unicode IVS >=20 > thank you for your reply. >=20 > It will be 2 characters. >=20 > select char_length(U&'+008FBA' || U&'+0E0102'); >=20 > char_length >=20 > ------------- >=20 > 2 >=20 > (1 =E8=A1=8C) >=20 > select length('=E8=BE=BA=F3=A0=84=82'); >=20 > length >=20 > -------- >=20 > 2 >=20 > (1 =E8=A1=8C) >=20 > select char_length('=E8=BE=BA=F3=A0=84=82'); >=20 > char_length >=20 > ------------- >=20 > 2 >=20 > (1 =E8=A1=8C) >=20 > $ psql -l >=20 > = =E3=83=87=E3=83=BC=E3=82=BF=E3=83=99=E3=83=BC=E3=82=B9=E4=B8=80=E8=A6=A7 >=20 > =E5=90=8D=E5=89=8D | =E6=89=80=E6=9C=89=E8=80=85 | = =E3=82=A8=E3=83=B3=E3=82=B3=E3=83=BC=E3=83=87=E3=82=A3=E3=83=B3=E3=82=B0 = | =E7=85=A7=E5=90=88=E9=A0=86=E5=BA=8F | > Ctype(=E5=A4=89=E6=8F=9B=E6=BC=94=E7=AE=97=E5=AD=90) | = =E3=82=A2=E3=82=AF=E3=82=BB=E3=82=B9=E6=A8=A9=E9=99=90 >=20 >=20 -----------+---------+------------------+----------+-------------------+-= -------------------- >=20 >=20 > D209007 | D209007 | UTF8 | C | C > | >=20 > postgres | D209007 | UTF8 | C | C > | >=20 > template0 | D209007 | UTF8 | C | C > | =3Dc/D209007 + >=20 > | | | | > | D209007=3DCTc/D209007 >=20 > template1 | D209007 | UTF8 | C | C > | =3Dc/D209007 + >=20 > | | | | > | D209007=3DCTc/D209007 >=20 > (4 =E8=A1=8C) >=20 > $ cat pgdata/PG_VERSION >=20 > 13 >=20 > Moto. >=20 > FROM: David G. Johnston > SENT: Tuesday, March 29, 2022 12:38 PM > TO: =E8=8D=92=E4=BA=95=E5=85=83=E6=88=90 > CC: pgsql-admin@lists.postgresql.org > SUBJECT: Re: About Unicode IVS >=20 > On Monday, March 28, 2022, =E8=8D=92=E4=BA=95=E5=85=83=E6=88=90 = wrote: >=20 >> Hi, >>=20 >> In the Length () function, it will be 2 characters where you want it=20 >> to be 1 character. >>=20 >> Is it possible to respond by changing the settings such as changing=20 >> the collation setting like SQL Server? >>=20 >> Also, if you understand how to deal with it (eg, create your own=20 >> function), it would be helpful if you could provide as much=20 >> information as you can. >=20 > Try char_length(text) instead. >=20 > David J. -- Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012 Links: ------ [1]=20 https://stackoverflow.com/questions/7931204/what-is-normalized-utf-8-all-= about [2] https://en.wikipedia.org/wiki/Unicode_equivalence