Locale Customization doesn't work for UK English windows
AntWatCDL opened this issue · 3 comments
I am using UK English Windows 10, and get the following error when I try to use the Docker image to create a container:
2021-09-13 15:25:46.626 BST [1] LOG: invalid value for parameter "lc_messages": "English_United Kingdom.1252"
This is similar to the error that is corrected by the "Locale Customization" section in the ReadMe file, but has a different pattern.
In the ReadMe, and other places online, the error refers to something like de_DE.UTF-8
, whereas my error refers to English_United Kingdom.1252
. If I try using English_United Kingdom
and 1252
, instead of de_DE
and UTF-8
, I get errors about the locale file being missing.
Can someone tell me the correction to make in my case?
English_United Kingdom.1252
is a Windows specific locale name. There are only Linux-based postgres
images (even if you run in via Docker on Windows), so you would need to use a Linux locale name. I think the equivalent is en_GB.UTF-8
.
Thanks for that, but I tried en_GB.UTF-8
and it made no difference.
I am using Docker for Windows.
The fix in the ReadMe is just a search and replace, so isn't going to work because my PC is causing English_United Kingdom.1252
to be used as the parameter for lc_messages
(according to the error message).
I think I need a slightly different fix?
To be clear, the supported means of changing to a locale we don't bundle is to generate it, then set it, as in:
FROM postgres:13
RUN localedef -i en_GB -c -f UTF-8 -A /usr/share/locale/locale.alias en_GB.UTF-8
ENV LANG en_GB.utf8