Swap UTF8 enconding to SQL_ASCII Pgadmin

Asked

Viewed 60 times

0

Good afternoon!

I need to know if it is possible to change the enconding of my utf8 bank to SQL_ASCII, without deleting and re-creating the bank! The problem that is happening is that my bank is set with Unicode UTF-8 and the Charset of the site is with ISO-8859-1 so the cararacters are like "".

1 answer

0

To change the encoding of your database:

  1. Create a new database with different encoding and name
    • ex: new bank (ISO-8859-1)
  2. Create a dump from your current database
  3. Restore the dump to the new bank, created in step 1
  4. Test if your application runs correctly with the new database
  5. Rename the old database
    • ex: banco_application (UTF-8) for old banco_application (UTF-8)
  6. Rename the new database with the old database name
    • ex: new bank (ISO-8859-1) for bank application (ISO-8859-1)
  7. Test the application again

In case of emergency, simply remove the new bank and rename the old one

ex: old bank (UTF-8) for bank_application (UTF-8)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.