Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 92CD63405CE for ; Wed, 22 Feb 2012 14:37:50 -0400 (AST) Received: from mail-bk0-f46.google.com ([209.85.214.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S0H4W-0003ka-Ln for pgsql-bugs@postgresql.org; Wed, 22 Feb 2012 18:37:50 +0000 Received: by bkcjm19 with SMTP id jm19so371709bkc.19 for ; Wed, 22 Feb 2012 10:37:35 -0800 (PST) Received-SPF: pass (google.com: domain of eshkinkot@gmail.com designates 10.204.151.196 as permitted sender) client-ip=10.204.151.196; Authentication-Results: mr.google.com; spf=pass (google.com: domain of eshkinkot@gmail.com designates 10.204.151.196 as permitted sender) smtp.mail=eshkinkot@gmail.com; dkim=pass header.i=eshkinkot@gmail.com Received: from mr.google.com ([10.204.151.196]) by 10.204.151.196 with SMTP id d4mr16540659bkw.29.1329935855859 (num_hops = 1); Wed, 22 Feb 2012 10:37:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type:content-transfer-encoding; bh=8XtuUhBNVO0FnYqkatQWH44taOvptlFijMGmCbrrJ0U=; b=AYlotnk/rYtUOp3EOq4luKjxvM/xl25RKGLsrYZ12UYi8nULXkE8pFYWNrlrBaQ5Ev j2Asas4g1dnSc8NIK695xuwnANETju5uHWTOEHkomNqxjEW/oQLdaqZWjfFFK7LrdxJU sCB7pxAPP0PET9bAt99HpPyFSdriz6xkqwJN4= Received: by 10.204.151.196 with SMTP id d4mr13399997bkw.29.1329935855784; Wed, 22 Feb 2012 10:37:35 -0800 (PST) Received: from home.progtech.ru (os.progtech.ru. [80.252.153.41]) by mx.google.com with ESMTPS id x22sm53278533bkw.11.2012.02.22.10.37.33 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Feb 2012 10:37:34 -0800 (PST) From: Sergey Burladyan To: pgsql-bugs@postgresql.org Subject: Re: BUG #6480: NLS text width problem References: Date: Wed, 22 Feb 2012 22:37:31 +0400 In-Reply-To: (eshkinkot@gmail.com's message of "Tue, 21 Feb 2012 21:25:15 +0000") Message-ID: <87obsq4sus.fsf@home.progtech.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201202/165 X-Sequence-Number: 32508 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:=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 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=20 --------+------+-----------+---------+------------- Child tables: t_1, t_2 Has OIDs: no Table "public.d" Column | Type | Modifiers | Storage | Description=20 --------+------+-----------+---------+------------- 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: =D0=A2=D0=B0=D0=B1=D0=BB=D0=B8=D1=86=D0=B0 "public.t" =D0=9A=D0=BE=D0=BB=D0=BE=D0=BD=D0=BA=D0=B0 | =D0=A2=D0=B8=D0=BF | =D0=9C= =D0=BE=D0=B4=D0=B8=D1=84=D0=B8=D0=BA=D0=B0=D1=82=D0=BE=D1=80=D1=8B | =D0=A5= =D1=80=D0=B0=D0=BD=D0=B8=D0=BB=D0=B8=D1=89=D0=B5 | =D0=9E=D0=BF=D0=B8=D1=81= =D0=B0=D0=BD=D0=B8=D0=B5=20 ---------+-----+--------------+-----------+---------- =D0=94=D0=BE=D1=87=D0=B5=D1=80=D0=BD=D0=B8=D0=B5 =D1=82=D0=B0=D0=B1=D0=BB= =D0=B8=D1=86=D1=8B: t_1, t_2 =D0=A1=D0=BE=D0=B4=D0=B5=D1=80=D0=B6=D0=B8=D1=82 OID: =D0=BD=D0=B5=D1=82 =D0=A2=D0=B0=D0=B1=D0=BB=D0=B8=D1=86=D0=B0 "public.d" =D0=9A=D0=BE=D0=BB=D0=BE=D0=BD=D0=BA=D0=B0 | =D0=A2=D0=B8=D0=BF | =D0=9C= =D0=BE=D0=B4=D0=B8=D1=84=D0=B8=D0=BA=D0=B0=D1=82=D0=BE=D1=80=D1=8B | =D0=A5= =D1=80=D0=B0=D0=BD=D0=B8=D0=BB=D0=B8=D1=89=D0=B5 | =D0=9E=D0=BF=D0=B8=D1=81= =D0=B0=D0=BD=D0=B8=D0=B5=20 ---------+-----+--------------+-----------+---------- =D0=9D=D0=B0=D1=81=D0=BB=D0=B5=D0=B4=D1=83=D0=B5=D1=82: t_1, t_2 =D0=A1=D0=BE=D0=B4=D0=B5=D1=80=D0=B6=D0=B8=D1=82 OID: =D0=BD=D0=B5=D1=82 --=20 Sergey Burladyan