Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 2CC5D116A13A for ; Tue, 21 Feb 2012 17:25:30 -0400 (AST) Received: from mahout.postgresql.org ([98.129.198.123]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RzxDE-0000Gy-1g for pgsql-bugs@postgresql.org; Tue, 21 Feb 2012 21:25:29 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RzxD1-0006nv-Ct for pgsql-bugs@postgresql.org; Tue, 21 Feb 2012 21:25:15 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1RzxD1-0003Tf-1y for pgsql-bugs@postgresql.org; Tue, 21 Feb 2012 21:25:15 +0000 Date: Tue, 21 Feb 2012 21:25:15 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #6480: NLS text width problem To: pgsql-bugs@postgresql.org From: eshkinkot@gmail.com X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201202/164 X-Sequence-Number: 32507 The following bug has been logged on the website: Bug reference: 6480 Logged by: Sergey Burladyan Email address: eshkinkot@gmail.com PostgreSQL version: 9.1.2 Operating system: Debian testing Description: = This code incorrectly calculate width for translated text if it multibyte string. strlen(ct) vs. UTF-8 src/bin/psql/describe.c:2100 else { /* display the list of child tables */ const char *ct =3D _("Child tables"); for (i =3D 0; i < tuples; i++) { if (i =3D=3D 0) printfPQExpBuffer(&buf, "%s: %s", ct, PQgetvalue(result, i, 0)); else printfPQExpBuffer(&buf, "%*s %s", (int) strlen(ct), "", PQgetvalue(result, i, 0)); if (i < tuples - 1) appendPQExpBuffer(&buf, ","); printTableAddFooter(&cont, buf.data); } } PQclear(result);