From 2c55d9c5555abb34019c8f6a5e3c12a7b1ba16d4 Mon Sep 17 00:00:00 2001 From: Brian Orpin Date: Wed, 17 Feb 2021 07:43:37 +0000 Subject: [PATCH] Update recorder docs - create PostgreSQL database with utf8 encoding (#16077) * Update recorder docs - create PostgreSQL database with utf8 encoding ref https://github.com/home-assistant/core/issues/44595 The issue appears to be caused by the PostgreSQL database not using `utf8` encoding. PostgreSQL default is `SQL_ASCII`. Recreated the database with `utf8` encoding and the errors were not seen. * Update recorder.markdown Add in the change to the `db_url` option * Update recorder.markdown Spelling error --- source/_integrations/recorder.markdown | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/_integrations/recorder.markdown b/source/_integrations/recorder.markdown index b3f9be53691..370e9ed5b76 100644 --- a/source/_integrations/recorder.markdown +++ b/source/_integrations/recorder.markdown @@ -319,6 +319,14 @@ Once Home Assistant finds the database, with the right level of permissions, all ### PostgreSQL +Create the PostgreSQL database with `utf8` encoding. The PostgreSQL default encoding is `SQL_ASCII`. From the `postgres` user account; +```bash +createdb -E utf8 DB_NAME +``` +Where `DB_NAME` is the name of your database + +If the Database in use is not `utf8`, adding `?client_encoding=utf8` to the `db_url` may solve any issue. + For PostgreSQL you may have to install a few dependencies: ```bash