postgres.app OS X psql character encoding (utf-8) problem

From: Chris Hiestand <chiestand(at)salk(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: postgres.app OS X psql character encoding (utf-8) problem
Date: 2014-01-09 20:55:04
Message-ID: ED7A6905-C6F4-4AE2-AED4-B654FCE15765@salk.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi everyone,

I am running Postgres93.app (v 9.3.1). I'm new to Postgres, but experienced with MySQL and *nix. I'm having a problem with the command line client "psql" while connecting to postgress.app running on the localhost on OS X. It's behaving as if somewhere a character encoding is set incorrectly, but as far as I can tell, 'UTF-8' or 'UTF8' is correctly set everywhere.

If I enter a unicode character in the psql cli, such as:
user=# select 'ö';

But before hitting enter, use the keyboard "left" button to move the cursor across all the way to the left edge, and then back all the way to the right, the output get distorted and looks like this:
user=#select 'ö';;

If I do hit enter - the command works fine, so the problem is on the display/client side.

Here's why I think all my encodings are set correctly:

user(at)hostname:~ $ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=

user(at)hostname:~ $ psql
psql (9.3.1)
Type "help" for help.

user=# \encoding
UTF8

user=# \l user
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
--------+--------+----------+-------------+-------------+-------------------
user | user | UTF8 | en_US.UTF-8 | en_US.UTF-8 |

Also if, from my OS X terminal, I ssh into a linux box and run 'psql', the problem does not reproduce. So I'm fairly certain my terminal is not the problem.

Can anyone reproduce the problem, or have any advice about something I've missed?

Thanks,
Chris

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2014-01-09 21:09:11 Re: postgres.app OS X psql character encoding (utf-8) problem
Previous Message Adrian Klaver 2014-01-09 20:46:55 Re: pg_restore - selective restore use cases. HINT use DROP CASCADE