BUG #6480: NLS text width problem

Поиск
Список
Период
Сортировка
От eshkinkot@gmail.com
Тема BUG #6480: NLS text width problem
Дата
Msg-id E1RzxD1-0003Tf-1y@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #6480: NLS text width problem  (Sergey Burladyan <eshkinkot@gmail.com>)
Список pgsql-bugs
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:=20=20=20=20=20=20=20=20

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);

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #6479: Wrong Slash in pg_restore
Следующее
От: Sergey Burladyan
Дата:
Сообщение: Re: BUG #6480: NLS text width problem