pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sergey Burladyan <eshkinkot@gmail.com>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #6480: NLS text width problem
Date: Wed, 22 Feb 2012 22:37:31 +0400
Message-ID: <87obsq4sus.fsf@home.progtech.ru> (raw)
In-Reply-To: <E1RzxD1-0003Tf-1y@wrigleys.postgresql.org>
References: <E1RzxD1-0003Tf-1y@wrigleys.postgresql.org>

eshkinkot@gmail.com writes:

> 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

Test case:

create table t ();
create table t_1 () inherits (t);
create table t_2 () inherits (t);
create table d () inherits (t_1, t_2);

\d+ t
\d+ d

                 Table "public.t"
 Column | Type | Modifiers | Storage | Description 
--------+------+-----------+---------+-------------
Child tables: t_1,
              t_2
Has OIDs: no

                 Table "public.d"
 Column | Type | Modifiers | Storage | Description 
--------+------+-----------+---------+-------------
Inherits: t_1,
          t_2
Has OIDs: no

English, correct indentation:
. . .
Child tables: t_1,
              t_2
. . .
Inherits: t_1,
          t_2

Russian (UTF-8), wrong indentation:

                 Таблица "public.t"
 Колонка | Тип | Модификаторы | Хранилище | Описание 
---------+-----+--------------+-----------+----------
Дочерние таблицы: t_1,
                                 t_2
Содержит OID: нет


                 Таблица "public.d"
 Колонка | Тип | Модификаторы | Хранилище | Описание 
---------+-----+--------------+-----------+----------
Наследует: t_1,
                    t_2
Содержит OID: нет

-- 
Sergey Burladyan



view thread (8+ messages)  latest in thread

Message-ID: <87obsq4sus.fsf@home.progtech.ru>
Permalink:  ../87obsq4sus.fsf@home.progtech.ru/
Also on:    postgresql.org/message-id/87obsq4sus.fsf@home.progtech.ru

 · 

reply

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: <87obsq4sus.fsf@home.progtech.ru>
  References: <E1RzxD1-0003Tf-1y@wrigleys.postgresql.org> <87obsq4sus.fsf@home.progtech.ru>

* 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