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.