Re: psql display of Unicode combining characters in 8.2 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: psql display of Unicode combining characters in 8.2
Date
Msg-id 21550.1167248981@sss.pgh.pa.us
Whole thread Raw
In response to Re: psql display of Unicode combining characters in 8.2  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: psql display of Unicode combining characters in 8.2  (Michael Fuhr <mike@fuhr.org>)
List pgsql-hackers
I wrote:
> Actually, looking at the comments for ucs_wcwidth() in wchar.c, it seems
> that this is already accounted for in the "dsplen" output: characters
> for which -1 is returned are control characters, characters for which
> 0 is returned should be printed as-is and counted as zero width.  So the
> bug is just that pg_wcsformat conflates the two cases.

I've applied the attached patch to fix this, but not being much of a
user of languages that have combining characters, I can't test it very
well.  Please check out the behavior and see if you like it.

            regards, tom lane


Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: pgindent infelicity
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] Allow the identifier length to be increased via a configure option