RE: About Unicode IVS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



thank you for your reply.

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

 

 

   名前    | 所有者  | エンコーディング照合順序   | Ctype(変換演算子) |    アクセス権限

-----------+---------+------------------+-------------+-------------------+---------------------

D209007   | D209007 | UTF8             | C           | C                 |

postgres  | D209007 | UTF8             | C           | C                 |

template0 | D209007 | UTF8             | C           | C                 | =c/D209007         +

           |         |                  |             |                   | D209007=CTc/D209007

template1 | D209007 | UTF8             | C           | C                 | =c/D209007         +

           |         |                  |             |                   | D209007=CTc/D209007

template2 | D209007 | UTF8             | ja_JP.UTF-8 | ja_JP.UTF-8       |

(5 )

 

D209007=# \c template2

データベース"template2"にユーザ"D209007"として接続しました。

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

char_length

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

           2

(1 )

 

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

char_length

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

           2

(1 )

 

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

length

--------

      2

(1 )

 

Moto.

 

From: Michel SALAIS <msalais@xxxxxxx>
Sent: Tuesday, March 29, 2022 6:35 PM
To: '
荒井元成' <n2029@xxxxxxxxxxxxx>; 'David G. Johnston' <david.g.johnston@xxxxxxxxx>
Cc: pgsql-admin@xxxxxxxxxxxxxxxxxxxx
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 “C” for all your databases (even if I don’t understand your titles 😊).

 

Michel SALAIS

 

De : 荒井元成 <n2029@xxxxxxxxxxxxx>
Envoyé : mardi 29 mars 2022 06:35
À : 'David G. Johnston' <david.g.johnston@xxxxxxxxx>
Cc : pgsql-admin@xxxxxxxxxxxxxxxxxxxx
Objet : RE: About Unicode IVS

 

 

thank you for your reply.

It will be 2 characters.

 

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

char_length

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

           2

(1 )

 

select length('󠄂');

length

--------

      2

(1 )

 

select char_length('󠄂');

char_length

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

           2

(1 )

 

$ psql -l

                                      データベース一覧

   名前    | 所有者  | エンコーディング | 照合順序 | Ctype(変換演算子) |    アクセス権限

-----------+---------+------------------+----------+-------------------+---------------------

D209007   | D209007 | UTF8             | C        | C                 |

postgres  | D209007 | UTF8             | C        | C                 |

template0 | D209007 | UTF8             | C        | C                 | =c/D209007         +

           |         |                  |          |                   | D209007=CTc/D209007

template1 | D209007 | UTF8             | C        | C                 | =c/D209007         +

           |         |                  |          |                   | D209007=CTc/D209007

(4 )

 

 

$ cat pgdata/PG_VERSION

13

 

Moto.

 

From: David G. Johnston <david.g.johnston@xxxxxxxxx>
Sent: Tuesday, March 29, 2022 12:38 PM
To:
荒井元成 <n2029@xxxxxxxxxxxxx>
Cc: pgsql-admin@xxxxxxxxxxxxxxxxxxxx
Subject: Re: About Unicode IVS

 



On Monday, March 28, 2022,
荒井元成 <n2029@xxxxxxxxxxxxx> 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.

 


[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux