From: eshkinkot@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #6480: NLS text width problem
Date: Tue, 21 Feb 2012 21:25:15 +0000
Message-ID: <E1RzxD1-0003Tf-1y@wrigleys.postgresql.org> (raw)
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 = _("Child tables");
for (i = 0; i < tuples; i++)
{
if (i == 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);
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: eshkinkot@gmail.com
Subject: Re: BUG #6480: NLS text width problem
In-Reply-To: <E1RzxD1-0003Tf-1y@wrigleys.postgresql.org>
References: <E1RzxD1-0003Tf-1y@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox