Im using UB 16.04 LTS Server and today a new version of the locales-package has been released and installed:
Start-Date: 2019-02-21 09:44:05
Commandline: /usr/bin/apt-get -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold dist-upgrade
Upgrade: [...], locales:amd64 (2.23-0ubuntu10, 2.23-0ubuntu11), [...]
End-Date: 2019-02-21 09:44:45
I'm additionally using PostgreSQL 11 with databases relying on the character set windows-1252
for historical reasons:
Name | Owner | Encoding | Collate | Ctype | Access[...]
------+----------+----------+--------------+--------------+--------------
[...] | postgres | WIN1252 | de_DE.CP1252 | de_DE.CP1252 |
To make that available, the following command is used:
localedef -f CP1252 -i /usr/share/i18n/locales/de_DE /usr/lib/locale/de_DE.CP1252
Using locale-gen
instead gives the following error:
locale-gen de_DE.CP1252
Error: 'de_DE.CP1252' is not a supported language or locale
The problem now is that most likely after the new locales
-package has been installed, my manually added one was removed automatically and access to the databases relying on that locale failed:
2019-02-21 09:42:45.109 CET [27039] FATAL: Datenbank-Locale ist inkompatibel mit Betriebssystem
2019-02-21 09:42:45.109 CET [27039] DETAIL: Die Datenbank wurde mit LC_COLLATE »de_DE.CP1252« initialisiert, was von setlocale() nicht erkannt wird.
From my understanding, all locales which were recognized and enabled by dpkg-reconfigure locales
have been kept and my custom locale is not listed there.
I guess that app provides all locales from the file /usr/share/i18n/SUPPORTED
? Do I need to add my custom locale there manually as well? Something like the following doesn't seem to work, the new line is not shown:
de_DE.CP1252 CP1252
de_DE.UTF-8 UTF-8