Invalid byte sequence - Mailing list pgsql-admin

From Yambu
Subject Invalid byte sequence
Date
Msg-id CALhHtcC1zP2ADshm_Qo=RHHsTyqhR0jErAydPBZf2-ZbUrFLWg@mail.gmail.com
Whole thread Raw
Responses Re: Invalid byte sequence
Re: Invalid byte sequence
List pgsql-admin
Hello

How do i get past the error below. I have created a foreign table which points to a csv file and when i try to create another table it gives error below

The csv file has funny characters, how do i bypass those characters.

create foreign table table1
(
id int,
name text
)
SERVER local_file
OPTIONS (filename '/outputfile.csv' ,
format 'csv',
header 'TRUE',
delimiter ';'
);


create table2 as select * from table1;

ERROR:  invalid byte sequence for encoding "UTF8": 0x00
CONTEXT:  COPY table1, line 377617

pgsql-admin by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Check if installed extension is in use
Next
From: Laurenz Albe
Date:
Subject: Re: Invalid byte sequence