Fix psql's copy of utf2ucs() to match the backend's copy exactly;

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 4d1dd8d86567b61b42131d8e271ce587f645ac8b
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2010-08-16T00:06:54Z
Releases: 8.0.26
Fix psql's copy of utf2ucs() to match the backend's copy exactly;
in particular, propagate a fix in the test to see whether a UTF8 character has
length 4 bytes.  This is likely of little real-world consequence because
5-or-more-byte UTF8 sequences are not supported by Postgres nor seen anywhere
in the wild, but still we may as well get it right.  Problem found by Joseph
Adams.

Bug is aboriginal, so back-patch all the way.

Files

PathChange+/−
src/bin/psql/mbprint.c modified +2 −10