Re: Unicode Variation Selector and Combining character

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Unicode Variation Selector and Combining character
Дата
Msg-id 0c1d767e-8e35-b0d4-c21b-16bc013123b2@enterprisedb.com
обсуждение исходный текст
Ответ на RE: Unicode Variation Selector and Combining character  (荒井元成 <n2029@ndensan.co.jp>)
Список pgsql-hackers
On 01.06.22 08:15, 荒井元成 wrote:
> D209007=# select char_length(U&'\+0066FE' || U&'\+0E0103') ;
> 
> char_length
> 
> -------------
> 
>             2
> 
> (1 行)
> 
> I expect length 1.

The char_length function is defined to return the length in characters, 
so 2 is the correct answer.  What you appear to be looking for is length 
in glyphs or length in graphemes or display width, or something like 
that.  There is no built-in server side function for that.

It looks like psql is getting the display width wrong, but that's a 
separate issue.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Daniel Verite"
Дата:
Сообщение: Re: Unicode Variation Selector and Combining character
Следующее
От: 荒井元成
Дата:
Сообщение: RE: Unicode Variation Selector and Combining character