Re: psql weird behaviour with charset encodings

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: hernan gonzalez <hgonzalez(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: psql weird behaviour with charset encodings
Date: 2010-05-07 22:12:55
Message-ID: 2117.1273270375@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

hernan gonzalez <hgonzalez(at)gmail(dot)com> writes:
> But I actually dont want that. I want psql to not try any charset
> conversion, just give me the raw text as is stored in the db.

Well, that's what it's doing (given the default setting with
client_encoding equal to server_encoding), and then xterm is
misdisplaying the text because xterm thinks it's utf8. I'm
not very clear on why the \x case seems to display correctly
anyway, but you really need the terminal's encoding to agree
with client_encoding in order to get non-ASCII characters to
work well.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hernan gonzalez 2010-05-07 22:21:33 Re: psql weird behaviour with charset encodings
Previous Message hernan gonzalez 2010-05-07 22:01:56 Re: psql weird behaviour with charset encodings

Browse pgsql-hackers by date

  From Date Subject
Next Message hernan gonzalez 2010-05-07 22:21:33 Re: psql weird behaviour with charset encodings
Previous Message hernan gonzalez 2010-05-07 22:01:56 Re: psql weird behaviour with charset encodings