0

I have table raw_ca_dd

When upload data into the table I get an error like:

invalid byte sequence for encoding "UTF8": 0xfb
\copy raw_ca_dd from 'dbo_CA_list.csv.dak' with delimiter ','  csv quote as '"'

I unable to find this error. Help?

1

1 Answer 1

3

I'd say your file is in a different encoding, like iso-8859-15, rather than utf-8, since 0xfb is invalid utf-8, but is û in many of the ISO 8859 encodings. It could also be , ϋ, ű, ћ, ū in various other ISO 8859 encodings. There are also a bunch of code-pages (eg cp1255) I didn't bother to check.

Find out what the correct encoding of your file is and specify it with the encoding parameter to the copy command, eg:

\copy raw_ca_dd from 'dbo_CA_list.csv.dak' with encoding 'iso-8859-1' delimiter ','  csv quote as '"' 

Don't assume it's iso-8850-15. Find out the actual text encoding of the input file and use that.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.