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 1nZ93B-00059L-S8 for pgsql-admin@arkaria.postgresql.org; Tue, 29 Mar 2022 10:26:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nZ939-0005H2-CC for pgsql-admin@arkaria.postgresql.org; Tue, 29 Mar 2022 10:26:07 +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 1nZ939-0005Gs-1g for pgsql-admin@lists.postgresql.org; Tue, 29 Mar 2022 10:26:07 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nZ934-0005AK-H8 for pgsql-admin@lists.postgresql.org; Tue, 29 Mar 2022 10:26:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 22TAPu7K1107957; Tue, 29 Mar 2022 06:25:56 -0400 From: Tom Lane To: Holger Jakobs cc: pgsql-admin@lists.postgresql.org, n2029@ndensan.co.jp Subject: Re: About Unicode IVS In-reply-to: <15e893e2-1237-27f4-58ba-5ea59499fa3d@jakobs.com> 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> Comments: In-reply-to Holger Jakobs message dated "Tue, 29 Mar 2022 12:02:18 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1107955.1648549556.1@sss.pgh.pa.us> Date: Tue, 29 Mar 2022 06:25:56 -0400 Message-ID: <1107956.1648549556@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 > 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=# select octet_length(U&'\+008FBA' || U&'\+0E0102'); octet_length -------------- 7 (1 row) u8=# select octet_length(normalize(U&'\+008FBA' || U&'\+0E0102')); octet_length -------------- 7 (1 row) regards, tom lane