I am trying to import CSV sheet to Postgres database using PG-ADMIN. I am able to import sheet but after importing sheet due to special characters values are changed.

For example:

  • Before Importing: Indore - INO
  • After importing: Indore +AC0- INO
  • Expected value: Indore - INO

In the above example, +AC0 is added in place of - (dash).

I am using PG-ADMIN with encoding UTF8. The column: team_name is defined with character varying(300) NOT NULL.

How can I import exact value or how can we handle special characters while importing?

  • Is the dash character an ordinary minus sign in the data that you're importing? – Kusalananda Feb 13 at 18:40
  • what import commands did you use? what table definition did you use (for that column)? – Jeff Schaller Feb 13 at 18:41
  • @Kusalananda yes. Its a minus sign with space both side. – Nishant Khandelwal Feb 14 at 6:39
  • @JeffSchaller I am using PG-ADMIN tool. There is an option to import so using this only.It uses copy command. column: team_name character varying(300) NOT NULL – Nishant Khandelwal Feb 14 at 6:44
  • You might have an encoding problem with your input file: stackoverflow.com/q/50927451/6216002 – Haxiel Feb 14 at 11:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.