Server: Ubuntu 18.04 Desktop 64-bit
In the Atlassian Instructions:
https://confluence.atlassian.com/conf68/database-setup-for-postgresql-947171095.html
I am trying to follow the step:
2. Next, create a database (for example confluence
):
confluenceuser
)utf8
encoding.utf8
. Other collations, such as "C", are known to cause issues with Confluence. These are my commands and results:
sudo -u postgres psql
postgres=# \c
You are now connected to database "postgres" as user "postgres".
postgres-# \du
List of roles
Role name | Attribute | Member of
------------------------+---------------------------------------------------------------------------------------+-----------
confluenceuser | Superuser, Create role, Create DB | {}
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
postgres=# create database test1 owner=confluenceuser encoding=utf8 lc_collate=utf8;
ERROR: invalid locale name: "utf8"
I have Googled for several hours on this, and found only one possible cause and no solutions.
Possible cause: There is no file /etc/locale.conf, even though I ran:
root@JGist-Server-1:/etc# locale-gen
Generating locales (this might take a while)...
en_AG.UTF-8... done
...
en_US.UTF-8... done
en_ZA.UTF-8... done
en_ZM.UTF-8... done
en_ZW.UTF-8... done
Generation complete.
root@JGist-Server-1:/etc#
At any rate, it seems there are no possible candidates in the "supported locales" documentation that are anything like a simple "utf8" (or UTF8, UTF-8, etc.); all have language and country codes, like en_US.UTF-8 as seen above.
It seems to me there is something missing from the Instructions page linked above.
Please help.
Hi James,
1. In your command looks like you need also dpkg-reconfigure locales.
2. Regarding related locale in DBMS, in my experience, I use the ru_RU.utf-8 like this
ENCODING 'UTF8' LC_COLLATE = 'ru_RU.UTF-8' LC_CTYPE = 'ru_RU.UTF-8';
Hence don't afraid, let's set the en_US.UTF-8 locale for the LC_COLLATE.
Cheers,
Gonchik Tsymzhitov
I had already tried en_US.UTF-8 and it didn’t work either; I think it generated a syntax error with the arrow pointing at the hyphen as the cause of the syntax error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.