psql_ascii_2_utf8
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
psql_ascii_2_utf8 [2014/10/20 14:34] – created sweitmann | psql_ascii_2_utf8 [2014/10/20 15:19] – sweitmann | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Software packages | + | ===== Convert PostgreSQL database from SQL_ASCII to UTF8 ===== |
- | Login to your server as " | + | Login to your server as " |
| | ||
Then switch to the " | Then switch to the " | ||
Line 20: | Line 20: | ||
file UTF8_database_dump.sql | file UTF8_database_dump.sql | ||
+ | You should now get the following output: | ||
+ | |||
+ | UTF8_database_dump.sql: | ||
+ | Now open the new UTF8_database_dump.sql file with your favourite editor and change the line: | ||
+ | SET client_encoding = ' | ||
+ | to: | ||
+ | SET client_encoding = ' | ||
+ | Create a new database: | ||
+ | createdb new_UTF8_database_name | ||
+ | And import the UTF8_database_dump.sql | ||
+ | psql new_UTF8_database_name < UTF8_database_dump.sql | ||
+ | That's it! | ||
+ | |||
psql_ascii_2_utf8.txt · Last modified: 2023/02/20 14:52 by sweitmann