Skip site navigation (1) Skip section navigation (2)

BUG #6480: NLS text width problem

From: eshkinkot(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #6480: NLS text width problem
Date: 2012-02-21 21:25:15
Message-ID: E1RzxD1-0003Tf-1y@wrigleys.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged on the website:

Bug reference:      6480
Logged by:          Sergey Burladyan
Email address:      eshkinkot(at)gmail(dot)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);



Responses

pgsql-bugs by date

Next:From: michal.rakoczyDate: 2012-02-22 12:28:38
Subject: BUG #6481: postgres shuts down unexpectedly
Previous:From: Tom LaneDate: 2012-02-21 20:38:22
Subject: Re: BUG #6479: Wrong Slash in pg_restore

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group