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 1nZ9dl-0007hX-3G for pgsql-admin@arkaria.postgresql.org; Tue, 29 Mar 2022 11:03:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nZ9dj-0005xw-Vu for pgsql-admin@arkaria.postgresql.org; Tue, 29 Mar 2022 11:03:55 +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 1nZ9dj-0005qq-L1 for pgsql-admin@lists.postgresql.org; Tue, 29 Mar 2022 11:03:55 +0000 Received: from inet-gw.ndensan.co.jp ([192.47.64.84]) by magus.postgresql.org with smtp (Exim 4.92) (envelope-from ) id 1nZ9de-0005ZV-Fn for pgsql-admin@lists.postgresql.org; Tue, 29 Mar 2022 11:03:54 +0000 From: =?UTF-8?B?6I2S5LqV5YWD5oiQ?= To: "'Tom Lane'" , "'Holger Jakobs'" Cc: References: <00e201d8431c$cb38eb40$61aac1c0$@ndensan.co.jp> <00f601d84326$5367cf00$fa376d00$@ndensan.co.jp> <006501d84350$37bae6f0$a730b4d0$@msym.fr> <012c01d84353$1f8a8d30$5e9fa790$@ndensan.co.jp> <15e893e2-1237-27f4-58ba-5ea59499fa3d@jakobs.com> <1107956.1648549556@sss.pgh.pa.us> In-Reply-To: <1107956.1648549556@sss.pgh.pa.us> Subject: RE: About Unicode IVS Date: Tue, 29 Mar 2022 20:03:45 +0900 Message-ID: <013501d8435c$a8f1c9e0$fad55da0$@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: AQHjbJJi0v014goMGofTVeHbofwGGgJNxTOuAs0qQHoDP/CCzQHZXpaPAIhlApYBPZ/8AqxgDdaw Content-Language: ja List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk thank you for your reply. In SQL Server, the variant character selector is treated as one = character with two characters. The collation order is = Japanese_XJIS_140_CS_AS_KS_WS_VSS_UTF8. Moto. -----Original Message----- From: Tom Lane =20 Sent: Tuesday, March 29, 2022 7:26 PM To: Holger Jakobs Cc: pgsql-admin@lists.postgresql.org; n2029@ndensan.co.jp Subject: Re: About Unicode IVS Holger Jakobs writes: > It's totally correct that the two characters are still two characters. > You would have to normalize the string first, so that the combination=20 > becomes one character. Yeah. In principle the normalize() function ought to do this for you. = But it doesn't seem to shorten the given example for me; I'm not sure if = that means the example is incorrect, or if it's a bug in normalize(). u8=3D# select octet_length(U&'\+008FBA' || U&'\+0E0102'); octet_length -------------- 7 (1 row) u8=3D# select octet_length(normalize(U&'\+008FBA' || U&'\+0E0102')); = octet_length -------------- 7 (1 row) regards, tom lane