Search Postgresql Archives

Re: Maintaining accents with "COPY" ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Looks like an encoding issue and a mismatch between database encoding and client
> encoding. You can check both with:
> 
> SHOW server_encoding;
> SHOW client_encoding;
> 
> Then either set the client encoding or use COPY's encoding option to match the
> database encoding (I assume utf8 in this example):
> 
> SET client_encoding = 'utf8';
> COPY (...) TO /tmp/bar.csv DELIMITER ',' CSV HEADER ENCODING 'utf8';
> 
> --
> Erik

Hi Erik,

Looks like you could well be right about encoding:

postgres=# SHOW server_encoding;
 server_encoding 
-----------------
 UTF8
(1 row)

postgres=# SHOW client_encoding;
 client_encoding 
-----------------
 SQL_ASCII
(1 row)

I will try your suggestion...







[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux