Re: Different encodings and locales on one machine

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: mail(at)localhorst(dot)es
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Different encodings and locales on one machine
Date: 2021-03-04 15:29:33
Message-ID: 1360325.1614871773@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

mail(at)localhorst(dot)es writes:
> at the moment I am running two different PostgreSQL (12) servers on one
> Ubuntu 20.04 machine.
> For server one I need WIN1252 encoding with "de_DE.cp1252" locales set.
> For server two I need UTF8 encoding, but also with "de_DE.cp1252"
> locales set.

This statement is nonsensical. The second component of the locale name
is precisely the encoding that the locale is meant to be used with.
There is no such thing as "de_DE.cp1252" locale that works with UTF8
data --- you'd have to use "de_DE.utf8" instead.

You haven't explained exactly why you think you have that requirement,
but I wonder whether you aren't confusing client and server encoding.
There's no problem in having a client that is using WIN1252 encoding
while the server uses UTF8 --- just make sure that the client_encoding
parameter is set correctly for that client.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message srijith s 2021-03-04 18:14:15 Postgers AD authentication on windows server
Previous Message Holger Jakobs 2021-03-04 12:14:03 Re: Different encodings and locales on one machine