Re: BUG #6480: NLS text width problem

From: Sergey Burladyan <eshkinkot(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6480: NLS text width problem
Date: 2012-02-22 18:37:31
Message-ID: 87obsq4sus.fsf@home.progtech.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

eshkinkot(at)gmail(dot)com writes:

> 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

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message kouber 2012-02-22 18:53:19 BUG #6483: Rows being evaluated, although being outside the LIMIT / OFFSET boundaries
Previous Message dzolotarevskiy 2012-02-22 15:12:12 BUG #6482: Service terminates executing "With ... as ... UPDATE" query