You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You should set the client_encoding in the PostgreSQL connection.
I believe you can set this in the options when you open the connection (should be in database.yml in rails apps).
But if your database is in UTF-8 then this won't work (because PostgreSQL will still try to read your data and convert to the DB encoding) and the best approach will be to clean the file and get rid of invalid UTF-8 byte sequences.
i've a csv file, when i check using unix file command, for example :
its return text/plain; charset=us-ascii
But when i try to import using postgres-copy i've an exception :
how do i set a character encoding before import a csv to the database ?
The text was updated successfully, but these errors were encountered: