Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qesR8-008W7m-L7 for pgsql-general@arkaria.postgresql.org; Sat, 09 Sep 2023 07:31:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qesR6-00FFDt-FM for pgsql-general@arkaria.postgresql.org; Sat, 09 Sep 2023 07:31:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qesR6-00FFCn-3e for pgsql-general@lists.postgresql.org; Sat, 09 Sep 2023 07:31:19 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qesR0-003ZXx-2d for pgsql-general@lists.postgresql.org; Sat, 09 Sep 2023 07:31:18 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id CAB7CCDFA; Sat, 9 Sep 2023 09:31:09 +0200 (CEST) Date: Sat, 9 Sep 2023 09:31:09 +0200 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: postgreSQL UPPER Method is converting the =?utf-8?Q?character?= =?utf-8?B?ICLCtSI=?= into "M" Message-ID: <20230909073109.yneiw34berwj57bg@hjp.at> Mail-Followup-To: pgsql-general@lists.postgresql.org References: <1507834.1694008417@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xj6o3tl5iyzhcowo" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --xj6o3tl5iyzhcowo Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2023-09-06 17:29:21 +0200, Francisco Olarte wrote: > On Wed, 6 Sept 2023 at 16:40, Sai Teja = wrote: > > Actually we are migrating the data from DB2 to postgreSQL. So in DB2 > > the upper method is converting =C2=B5 as =C2=B5 only but not as M. > > So, while validating the data we have encountered this problem. [...] > Maybe because unicode has GREEK CAPITAL LETTER MU ( 924, which looks > like capital M ), GREEK SMALL LETTER MU ( 956 ) and MICRO SIGN ( 181, > which looks like small mu ) while windows-1252 only has 0xB6 as micro. > OTOH Windows-1253 ( greek ansi ) has all three. >=20 > If your small mu are really micro-sign ( which is suspected if youused > 1252 ) maybe changing them to that helps ( but I do not have the > resources to test that on hand ). Nope, it doesn't: hjp=3D> select chr(181) as micro, chr(956) as mu; =E2=95=94=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=A4=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=97 =E2=95=91 micro =E2=94=82 mu =E2=95=91 =E2=95=9F=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=BC=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=95=A2 =E2=95=91 =C2=B5 =E2=94=82 =CE=BC =E2=95=91 =E2=95=9A=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=A7=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=9D (1 row) hjp=3D> select upper(chr(181)) as micro, upper(chr(956)) as mu; =E2=95=94=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=A4=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=97 =E2=95=91 micro =E2=94=82 mu =E2=95=91 =E2=95=9F=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=BC=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=95=A2 =E2=95=91 =CE=9C =E2=94=82 =CE=9C =E2=95=91 =E2=95=9A=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=A7=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=9D (1 row) (At least not on an Ubuntu 22.04 system using the en_US.UTF-8 locale). IMHO uppercasing MICRO SIGN doesn't make much sense, but that was the decision that either the libc maintainers ore the Unicode committee made. hp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --xj6o3tl5iyzhcowo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmT8HzkACgkQ8g5IURL+ KF1Fqw/+LXANDf5IoW5b6AVr0aFLB9w+CVUK3dUx74ZCdxb13uEeUd0dNbmdlsyF Xo5HSspeLhTN84P/9eGR6Jrr1ybSFkFvXBXSXEdGB0qm9RaqbEdegJANchmKooch n/RjAAHTrY+vABGp2iiu9YHDHos5IH75Idl7oji/ZRvWKaqxj0HRq39GPcKJtRiI +N7znO92QxEe0aJY+QheVmio4q+1oXg0a1QbRYkIcyvuWJGs1MpncDZx66jYPfRc 97j/rxEvE0g/K1V8v9PiEeVPdyB9JtX0UpThUz+UdHLIBG9k9xrEEb8HZEe1IGmT VfJ1iD6AuG2EKU3Q9IzRuem+oabhDTn297KWs5jBnyH7DGXKHK6+16DHdEUZraQx yGUizEb/Iu9icTEZ8VlFhXlFeQN8bmB/wWSq3+0w4of8eYGv9bfm46hBLNbDkZe8 IJQLUdr2mchds22sQOxMUo2AVoAxsiKbpIA+eGO9WBVufWxCYHf0zTaqlk6JIFvE 63gxyReqK190nCf79ebt/0Zbj2jPmZkt707l/fWIGUrs9uQodeca+ODDQk4ZSIZM YTRsggbisijhmotDOgOSFm7gFpzNiZcLIfSKL872EOieX06dcJR53JfMWnCgbE3y MnLoHOeOg+GUMTnLwQcE5kdzfpgISuZak8/L4vWKV+TDAzs4ayE= =VNbv -----END PGP SIGNATURE----- --xj6o3tl5iyzhcowo--