psql & UTF8

Started by Teodor Sigaevabout 20 years ago3 messages
#1Teodor Sigaev
teodor@sigaev.ru

Working on UTF support in tsearch2 I noticed different output of psql:

1) initdb with SQL_ASCII:
contrib_regression=# select 'jisa n asd n asld kl ans d
contrib_regression'# asdfjkl; asdf kl;amsdf';
?column?
-----------------------------------------------------------
jisa n asd n asld kl ans d
asdfjkl; asdf kl;amsdf
(1 row)

2) initdb with UTF8
contrib_regression=# select 'jisa n asd n asld kl ans d
contrib_regression'# asdfjkl; asdf kl;amsdf';
?column?
------------------------------------
jisa n asd n asld kl ans d
asdfjkl; asdf kl;amsdf
(1 row)

Length of '--------' string is different. This difference is a reason for
installcheck failture of tsearch2 on UTF8 inited db.

Is it supposed behaviour of psql?

--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/

#2Martijn van Oosterhout
kleptog@svana.org
In reply to: Teodor Sigaev (#1)
Re: psql & UTF8

On Fri, Dec 09, 2005 at 01:39:50PM +0300, Teodor Sigaev wrote:

Working on UTF support in tsearch2 I noticed different output of psql:

<snip>

Length of '--------' string is different. This difference is a reason for
installcheck failture of tsearch2 on UTF8 inited db.

Is it supposed behaviour of psql?

Well, the fact that there's a difference is odd, though I imagine it
has something to do with the client_encoding setting.

There is a patch in the queue to handle multiline strings better which
should remove the difference...

Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/

Show quoted text

Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
tool for doing 5% of the work and then sitting around waiting for someone
else to do the other 95% so you can sue them.

#3Andrew Dunstan
andrew@dunslane.net
In reply to: Teodor Sigaev (#1)
Re: psql & UTF8

The regression tests are known to fail on non-SQL_ASCII encodings for
this and similar reasons.

cheers

andrew

Teodor Sigaev wrote:

Show quoted text

Working on UTF support in tsearch2 I noticed different output of psql:

1) initdb with SQL_ASCII:
contrib_regression=# select 'jisa n asd n asld kl ans d
contrib_regression'# asdfjkl; asdf kl;amsdf';
?column?
-----------------------------------------------------------
jisa n asd n asld kl ans d
asdfjkl; asdf kl;amsdf
(1 row)

2) initdb with UTF8
contrib_regression=# select 'jisa n asd n asld kl ans d
contrib_regression'# asdfjkl; asdf kl;amsdf';
?column?
------------------------------------
jisa n asd n asld kl ans d
asdfjkl; asdf kl;amsdf
(1 row)

Length of '--------' string is different. This difference is a reason
for installcheck failture of tsearch2 on UTF8 inited db.

Is it supposed behaviour of psql?