From de92b58bf86c668baffda79a6be44ac26d1b0e36 Mon Sep 17 00:00:00 2001 From: DecaTec Date: Sat, 3 Jul 2021 10:17:58 +0200 Subject: [PATCH 1/1] PostgreSQL encoding --- NextcloudRestore.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NextcloudRestore.sh b/NextcloudRestore.sh index 7f6bd0a..ee6d44f 100644 --- a/NextcloudRestore.sh +++ b/NextcloudRestore.sh @@ -237,7 +237,7 @@ if [ "${databaseSystem,,}" = "mysql" ] || [ "${databaseSystem,,}" = "mariadb" ]; # TODO: Use this if the database from the backup DOES NOT use UTF8 with multibyte support (e.g. for emoijs in filenames): #mysql -h localhost -u "${dbUser}" -p"${dbPassword}" -e "CREATE DATABASE ${nextcloudDatabase}" elif [ "${databaseSystem,,}" = "postgresql" ] || [ "${databaseSystem,,}" = "pgsql" ]; then - sudo -u postgres psql -c "CREATE DATABASE ${nextcloudDatabase} WITH OWNER ${dbUser} TEMPLATE template0 ENCODING \"UTF8\";" + sudo -u postgres psql -c "CREATE DATABASE ${nextcloudDatabase} WITH OWNER ${dbUser} TEMPLATE template0 ENCODING \"UNICODE\";" fi echo "Done" -- 2.34.1