psql '\copy to' and unicode escapes - Mailing list pgsql-general

From Steven Hirsch
Subject psql '\copy to' and unicode escapes
Date
Msg-id CABUrQ4xn4JMKaaEcQXHHV7Q34F6+ZQQZh4rhhwy+wabSEG_pjw@mail.gmail.com
Whole thread Raw
Responses Re: psql '\copy to' and unicode escapes  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
I fear that I'm missing something very obvious, but I cannot find a syntax that permits me to use an escaped hexadecimal representation in a CSV file and have that representation interpreted as the equivalent unicode character when inserting into the database.  Both client and server are using UTF8 encoding.

For example, trying to insert the 'degree' symbol, I've tried:

U&"\00b0"
E'\00b0'
"\u00b0"

In all cases, I simply get the literal string in the table, not the desired unicode character.

If I use them in an 'INSERT' statement, it works properly.  The problem is almost certainly between the chair and the keyboard, but what am I misunderstanding?

pgsql-general by date:

Previous
From: Łukasz Jarych
Date:
Subject: Re: Creating complex track changes database - challenge!
Next
From: "David G. Johnston"
Date:
Subject: Re: psql '\copy to' and unicode escapes