Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lHmro-0007uY-Uu for pgsql-admin@arkaria.postgresql.org; Thu, 04 Mar 2021 12:14:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lHmrn-0000Tm-Ru for pgsql-admin@arkaria.postgresql.org; Thu, 04 Mar 2021 12:14:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lHmrn-0000Te-KW for pgsql-admin@lists.postgresql.org; Thu, 04 Mar 2021 12:14:07 +0000 Received: from jakobs.com ([85.214.83.89] helo=rs.plausibolo.de) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lHmrl-0003uB-In for pgsql-admin@lists.postgresql.org; Thu, 04 Mar 2021 12:14:07 +0000 Received: from localhost (localhost [127.0.0.1]) by rs.plausibolo.de (Postfix) with ESMTP id BB1EA3805B7; Thu, 4 Mar 2021 13:14:04 +0100 (CET) Received: from rs.plausibolo.de ([IPv6:::1]) by localhost (h2367442.stratoserver.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id rcQQKot9SpgB; Thu, 4 Mar 2021 13:14:04 +0100 (CET) Received: from [192.168.178.197] (ip-37-201-154-46.hsi13.unitymediagroup.de [37.201.154.46]) by rs.plausibolo.de (Postfix) with ESMTPSA id 77F8C380551; Thu, 4 Mar 2021 13:14:04 +0100 (CET) Subject: Re: Different encodings and locales on one machine To: pgsql-admin@lists.postgresql.org References: From: Holger Jakobs Message-ID: <0a88d51e-125a-2233-5d78-e9f468bac9a3@jakobs.com> Date: Thu, 4 Mar 2021 13:14:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UkFVVqZkxCrQ6qYko4NsZ6R8XMyLWhADf" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --UkFVVqZkxCrQ6qYko4NsZ6R8XMyLWhADf Content-Type: multipart/mixed; boundary="hRWhfUDCE3GzBZ2r57jzdWDRKnMZXMalB"; protected-headers="v1" From: Holger Jakobs To: pgsql-admin@lists.postgresql.org Message-ID: <0a88d51e-125a-2233-5d78-e9f468bac9a3@jakobs.com> Subject: Re: Different encodings and locales on one machine References: In-Reply-To: --hRWhfUDCE3GzBZ2r57jzdWDRKnMZXMalB Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: de-DE Hi Patrick, I doubt that you need a server set to any locale which isn't UTF8. UTF8=20 is universal and can handle all characters. A client can (and does) specify the locale it wants to use for=20 communication with the server. So it's no problem at all if clients use=20 cp1252 while the server is capable of storing also characters beyond=20 this 8-bit-encoding. Hope this helps. Regards, Holger Am 04.03.21 um 09:40 schrieb mail@localhorst.es: > Hello, > > at the moment I am running two different PostgreSQL (12) servers on=20 > 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"=20 > locales set. > > I added support for > de_DE.CP1252 CP1252 > de_DE.CP1252 UTF-8 > to > /usr/local/share/i18n/SUPPORTED > and > /etc/locale.gen > and ran > locale-gen > > PostgreSQL seems only to recognize the last entry I added. So I can=20 > either use "WIN1252" or "UTF-8" encoding with "de_DE.cp1252" locales. > > Maybe I just have problems understanding how Liunx is handling=20 > encodings and locales. > > Does anyone is successfully running PostgreSQL with a similar setup as = > I described? > > Kind regards, > Patrick > > --=20 Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012 --hRWhfUDCE3GzBZ2r57jzdWDRKnMZXMalB-- --UkFVVqZkxCrQ6qYko4NsZ6R8XMyLWhADf Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wmMEABEIACMWIQScuJCxWJK1p5BOebGKV5yTsxlhugUCYEDPCwUDAAAAAAAKCRCKV5yTsxlhutW+ AKDaxMJ2VNgSZY4awn5mvjoMZC4b1ACglPpR614fbBQtgbZGrGEsckNeolg= =NIPi -----END PGP SIGNATURE----- --UkFVVqZkxCrQ6qYko4NsZ6R8XMyLWhADf--