Re: Maintaining accents with "COPY" ?

2023-05-25 Thread Erik Wienhold
> On 25/05/2023 12:08 CEST Laura Smith > wrote: > > > 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

Re: Maintaining accents with "COPY" ?

2023-05-25 Thread Erik Wienhold
> On 25/05/2023 13:26 CEST Peter J. Holzer wrote: > > On 2023-05-25 07:14:40 +, Laura Smith wrote: > > I'm currently doing a CSV export using COPY: > > > > COPY (select * from foo where bar='foo') TO '/tmp/bar.csv' DELIMITER ',' > > CSV HEADER; > > > > This works great apart from accents are

Re: Maintaining accents with "COPY" ?

2023-05-25 Thread Peter J. Holzer
On 2023-05-25 07:14:40 +, Laura Smith wrote: > I'm currently doing a CSV export using COPY: > > COPY (select * from foo where bar='foo') TO '/tmp/bar.csv' DELIMITER ',' CSV > HEADER; > > > This works great apart from accents are not preserved in the output, > for example é gets converted

Re: Maintaining accents with "COPY" ?

2023-05-25 Thread Laura Smith
> 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

Re: Maintaining accents with "COPY" ?

2023-05-25 Thread Erik Wienhold
> On 25/05/2023 09:14 CEST Laura Smith > wrote: > > I'm currently doing a CSV export using COPY: > > COPY (select * from foo where bar='foo') TO '/tmp/bar.csv' DELIMITER ',' CSV > HEADER; > > This works great apart from accents are not preserved in the output, for > example é gets converted to

Maintaining accents with "COPY" ?

2023-05-25 Thread Laura Smith
Hi I'm currently doing a CSV export using COPY: COPY (select * from foo where bar='foo') TO '/tmp/bar.csv' DELIMITER ',' CSV HEADER; This works great apart from accents are not preserved in the output, for example é gets converted to random characters, e.g. √© or similar. How can I