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 1nZ3ZR-0005Ga-19 for pgsql-admin@arkaria.postgresql.org; Tue, 29 Mar 2022 04:35:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nZ3ZO-0004K2-Gd for pgsql-admin@arkaria.postgresql.org; Tue, 29 Mar 2022 04:35:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nZ3ZN-0004Jf-Ty for pgsql-admin@lists.postgresql.org; Tue, 29 Mar 2022 04:35:02 +0000 Received: from inet-gw.ndensan.co.jp ([192.47.64.84]) by makus.postgresql.org with smtp (Exim 4.92) (envelope-from ) id 1nZ3ZE-0000mB-VL for pgsql-admin@lists.postgresql.org; Tue, 29 Mar 2022 04:34:59 +0000 From: =?UTF-8?B?6I2S5LqV5YWD5oiQ?= To: "'David G. Johnston'" Cc: References: <00e201d8431c$cb38eb40$61aac1c0$@ndensan.co.jp> In-Reply-To: Subject: RE: About Unicode IVS Date: Tue, 29 Mar 2022 13:34:49 +0900 Message-ID: <00f601d84326$5367cf00$fa376d00$@ndensan.co.jp> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00F7_01D84371.C350AF80" X-Mailer: Microsoft Outlook 16.0 thread-index: AQHjbJJi0v014goMGofTVeHbofwGGgJNxTOurK0EM1A= Content-Language: ja List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multipart message in MIME format. ------=_NextPart_000_00F7_01D84371.C350AF80 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =20 thank you for your reply. It will be 2 characters. =20 select char_length(U&'\+008FBA' || U&'\+0E0102'); char_length ------------- 2 (1 =E8=A1=8C) =20 select length('=E8=BE=BA=F3=A0=84=82'); length -------- 2 (1 =E8=A1=8C) =20 select char_length('=E8=BE=BA=F3=A0=84=82'); char_length ------------- 2 (1 =E8=A1=8C) =20 $ psql -l = =E3=83=87=E3=83=BC=E3=82=BF=E3=83=99=E3=83=BC=E3=82=B9=E4=B8=80=E8=A6=A7 =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 -----------+---------+------------------+----------+-------------------+-= -------------------- D209007 | D209007 | UTF8 | C | C | postgres | D209007 | UTF8 | C | C | template0 | D209007 | UTF8 | C | C | = =3Dc/D209007 + | | | | | = D209007=3DCTc/D209007 template1 | D209007 | UTF8 | C | C | = =3Dc/D209007 + | | | | | = D209007=3DCTc/D209007 (4 =E8=A1=8C) =20 =20 $ cat pgdata/PG_VERSION 13 =20 Moto. =20 From: David G. Johnston =20 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: Hi, =20 In the Length () function, it will be 2 characters where you want it to = be 1 character. Is it possible to respond by changing the settings such as changing the = collation setting like SQL Server? Also, if you understand how to deal with it (eg, create your own = function), it would be helpful if you could provide as much information = as you can. =20 =20 Try char_length(text) instead. =20 David J. =20 ------=_NextPart_000_00F7_01D84371.C350AF80 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

 

thank you for your = reply.

It will be 2 = characters.

 

select char_length(U&'\+008FBA' || = U&'\+0E0102');

char_length

-------------

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= 2

(1 =E8=A1=8C)

 

select length('=E8=BE=BA󠄂');

length

--------

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 2

(1 =E8=A1=8C)

 

select char_length('=E8=BE=BA󠄂');

char_length

-------------

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= 2

(1 =E8=A1=8C)

 

$ psql -l

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =E3=83=87=E3=83=BC=E3=82=BF=E3=83=99=E3=83=BC=E3=82=B9=E4=B8= =80=E8=A6=A7

=C2=A0=C2=A0 =E5=90=8D=E5=89=8D=C2=A0=C2=A0=C2=A0 | = =E6=89=80=E6=9C=89=E8=80=85=C2=A0 | = =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) |=C2=A0=C2=A0=C2=A0 = =E3=82=A2=E3=82=AF=E3=82=BB=E3=82=B9=E6=A8=A9=E9=99=90

-----------+---------+------------------+----------+--------= -----------+---------------------

D209007=C2=A0=C2=A0 | D209007 | = UTF8=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C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=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0| = D209007=3DCTc/D209007

template1 | D209007 | = UTF8=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 | C=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | = C=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 | = =3Dc/D209007=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = +

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | = D209007=3DCTc/D209007

(4 =E8=A1=8C)

 

 

$ cat pgdata/PG_VERSION

13

 

Moto.

 

From:<= /b> David G. = Johnston <david.g.johnston@gmail.com>
Sent: Tuesday, = March 29, 2022 12:38 PM
To:
=E8=8D=92=E4=BA=95=E5=85=83=E6=88=90 = <n2029@ndensan.co.jp>
Cc: = pgsql-admin@lists.postgresql.org
Subject: Re: About Unicode = IVS

 



On Monday, March 28, 2022, =
=E8=8D=92=E4=BA=95=E5=85=83=E6=88=90 <n2029@ndensan.co.jp> = wrote:

Hi,

 

In the Length () function, it will be 2 characters = where you want it to be 1 character.

Is it possible =
to respond by changing the settings such as changing the collation =
setting like SQL Server?
Also, if you =
understand how to deal with it (eg, create your own function), it would =
be helpful if you could provide as much information as you =
can.

 

 

Try char_length(text) = instead.

 

David = J.

 

------=_NextPart_000_00F7_01D84371.C350AF80--