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 1nZ8Zk-0003Mv-3j for pgsql-admin@arkaria.postgresql.org; Tue, 29 Mar 2022 09:55:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nZ8Zi-0002Ga-1T for pgsql-admin@arkaria.postgresql.org; Tue, 29 Mar 2022 09:55:42 +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 1nZ8Zh-0002GR-1Y for pgsql-admin@lists.postgresql.org; Tue, 29 Mar 2022 09:55:41 +0000 Received: from inet-gw.ndensan.co.jp ([192.47.64.84]) by makus.postgresql.org with smtp (Exim 4.92) (envelope-from ) id 1nZ8ZY-0003YB-C6 for pgsql-admin@lists.postgresql.org; Tue, 29 Mar 2022 09:55:39 +0000 From: =?UTF-8?B?6I2S5LqV5YWD5oiQ?= To: "'Michel SALAIS'" , "'David G. Johnston'" Cc: References: <00e201d8431c$cb38eb40$61aac1c0$@ndensan.co.jp> <00f601d84326$5367cf00$fa376d00$@ndensan.co.jp> <006501d84350$37bae6f0$a730b4d0$@msym.fr> In-Reply-To: <006501d84350$37bae6f0$a730b4d0$@msym.fr> Subject: RE: About Unicode IVS Date: Tue, 29 Mar 2022 18:55:29 +0900 Message-ID: <012c01d84353$1f8a8d30$5e9fa790$@ndensan.co.jp> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_012D_01D8439E.8F75B7A0" X-Mailer: Microsoft Outlook 16.0 thread-index: AQHjbJJi0v014goMGofTVeHbofwGGgJNxTOuAs0qQHoDP/CCzax89Y2A 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_012D_01D8439E.8F75B7A0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable thank you for your reply. Changing the collation order and CTYPE did not change the behavior. =20 =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 -----------+---------+------------------+-------------+------------------= -+--------------------- 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 template2 | D209007 | UTF8 | ja_JP.UTF-8 | ja_JP.UTF-8 = | (5 =E8=A1=8C) =20 D209007=3D# \c template2 =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 template2=3D# select char_length(U&'\+0000E6' || U&'\+000300'); char_length ------------- 2 (1 =E8=A1=8C) =20 template2=3D# select char_length(U&'\+008FBA' || U&'\+0E0102'); char_length ------------- 2 (1 =E8=A1=8C) =20 template2=3D# select length(U&'\+008FBA' || U&'\+0E0102'); length -------- 2 (1 =E8=A1=8C) =20 Moto. =20 From: Michel SALAIS =20 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, I think this has something to do with collation and ctype. As I see you = have it set to =E2=80=9CC=E2=80=9D for all your databases (even if I = don=E2=80=99t understand your titles =F0=9F=98=8A). =20 Michel SALAIS =20 De : =E8=8D=92=E4=BA=95=E5=85=83=E6=88=90 >=20 Envoy=C3=A9 : mardi 29 mars 2022 06:35 =C3=80 : 'David G. Johnston' > Cc : pgsql-admin@lists.postgresql.org = =20 Objet : RE: About Unicode IVS =20 =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 = =20 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_012D_01D8439E.8F75B7A0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

thank you for your = reply.

Changing the collation order and = CTYPE did not change the behavior.

 

 

=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 |=C2=A0 = =E7=85=A7=E5=90=88=E9=A0=86=E5=BA=8F=C2=A0=C2=A0 | = 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=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 | = 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 |

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

template2 | 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 | ja_JP.UTF-8 | ja_JP.UTF-8=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = |

(5 =E8=A1=8C)

 

D209007=3D# \c template2

=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

template2=3D# select char_length(U&'\+0000E6' || = U&'\+000300');

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)

 

template2=3D# 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)

 

template2=3D# select length(U&'\+008FBA' || = U&'\+0E0102');

length

--------

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

(1 =E8=A1=8C)

 

Moto.

 

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

 

Hi,

I think this has something to do with collation and ctype. = As I see you have it set to =E2=80=9CC=E2=80=9D for all your databases = (even if I don=E2=80=99t understand your titles 😊).

 

Michel = SALAIS

 

De : = =E8=8D=92=E4=BA=95=E5=85=83=E6=88=90= <n2029@ndensan.co.jp> =
Envoy=C3=A9 : mardi 29 mars 2022 = 06:35
=C3=80 : 'David G. Johnston' <david.g.johnston@gmail.com= >
Cc : pgsql-admin@lists.postgr= esql.org
Objet : RE: About Unicode = IVS

 

 

thank you for your = reply.

It will be 2 = characters.

 

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

char_length

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

        &= nbsp;  2

(1 =E8=A1=8C)

 

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

length

--------

      2

(1 =E8=A1=8C)

 

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

char_length

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

        &= nbsp;  2

(1 =E8=A1=8C)

 

$ psql -l

        &= nbsp;           &n= bsp;           &nb= sp;     =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        &= nbsp;    | C       = | C        &= nbsp;        |

postgres  | D209007 | UTF8        &= nbsp;    | C       = | C        &= nbsp;        |

template0 | D209007 | UTF8        &= nbsp;    | C       = | C        &= nbsp;        | =3Dc/D209007        <= /span> +

        &= nbsp;  |        <= /span> |        &= nbsp;         |        &= nbsp; |        &= nbsp;          | D209007=3DCTc/D209007

template1 | D209007 | UTF8        &= nbsp;    | C       = | C        &= nbsp;        | =3Dc/D209007        <= /span> +

        &= nbsp;  |        <= /span> |        &= nbsp;         |        &= nbsp; |        &= nbsp;          | 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.postgr= esql.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_012D_01D8439E.8F75B7A0--