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 1qdtPF-0055rm-DR for pgsql-general@arkaria.postgresql.org; Wed, 06 Sep 2023 14:21:21 +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 1qdtPD-00Aq64-AN for pgsql-general@arkaria.postgresql.org; Wed, 06 Sep 2023 14:21:19 +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 1qdtPC-00Aq5s-RY for pgsql-general@lists.postgresql.org; Wed, 06 Sep 2023 14:21:18 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qdtP9-0034bt-Eu for pgsql-general@lists.postgresql.org; Wed, 06 Sep 2023 14:21:17 +0000 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-99c1c66876aso551862966b.2 for ; Wed, 06 Sep 2023 07:21:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20230601.gappssmtp.com; s=20230601; t=1694010073; x=1694614873; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=QGZVMO0F6ms5kCON5yoPoJO1kzZSQnrgrEc8+WClUhk=; b=vhFVljWwJnq9NqbJB94NMEZB90EiNVroIa3xMl3M9AzJ+9HWLPGJ0d4uIenEIJYaSm PRvaqoOIz8a8sSzMCS4x+HRK2UCzExVNJS9ZsambvwrrsXSVWigcFJV5A5QD+lWVQCEY zpJ7xlEcxhqkaKS7d5Z3RkGyvkdTzbuulLvNRdzKAMSiO0jtbZ4Q/KocuLDKArRgn4mk cOK0SJOsqd/nGkGfCnUpUKk7M1poXExccS9ASdv5IKlrvt6LnpmXrsX7ZH99/cJ6SreQ MoxY4zoNYMFB1IPgIYxpaz44/nbGm93BDXsWWNpd6omqQk5Qa3rlIQCjdsLSQC8LFH5b E/3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694010073; x=1694614873; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=QGZVMO0F6ms5kCON5yoPoJO1kzZSQnrgrEc8+WClUhk=; b=V9BUTur1mGvwqkiS+iCgzsU2jUvsdGpZNd9Dxc5Bg7EuxSOZ8Jcn0MIq6HfOxQlyAl lkcQsyMifYe4A0aVODrTdwTz+zGrOo8wywm+Tv34kwEPgdEqZWX8SPYLyjVDZooU+RO8 wrwQk23s7n1V+JiiYuNx4EN/n5NXIGfDhnHOWlh5Zn5eUE/gNDO5OBGtz2mO6f1dPjiR wi7ORZ3FwEjzvP9n4OocXSf1RBm9WAZrYJFgHx4zta/GuD70uIzJMwsbhD9EZRfgKLJL hoBhIjnOU6jTQ8eqNY0cir22HTfzrKQm7taJx6cO9x5Un/+B7ToA17l4GCKb/x+DpIk3 F3bw== X-Gm-Message-State: AOJu0YwE8xTqHD2ptsef2q0EZckJeTxyIWBP4CJuhm7IPSkcPnsy5I3j w4NQF08YV1l8MkAJZEx7aWIErw== X-Google-Smtp-Source: AGHT+IEYsRAZVscEM/qLpA5+aqz/qW3N6Va+AKG5T+IB8CqMQ5yc+/14k/NYbXuOet7gdwOucZSnTw== X-Received: by 2002:a17:906:73da:b0:9a2:739:3aa1 with SMTP id n26-20020a17090673da00b009a207393aa1mr2367302ejl.61.1694010073319; Wed, 06 Sep 2023 07:21:13 -0700 (PDT) Received: from localhost.localdomain (178-190-171-96.adsl.highway.telekom.at. [178.190.171.96]) by smtp.gmail.com with ESMTPSA id p27-20020a17090635db00b009a168ab6ee2sm9023211ejb.164.2023.09.06.07.21.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Sep 2023 07:21:13 -0700 (PDT) Message-ID: Subject: Re: postgreSQL UPPER Method is converting the character =?ISO-8859-1?Q?=22=B5=22?= into "M" From: Laurenz Albe To: Sai Teja , Tom Lane Cc: pgsql-general@lists.postgresql.org Date: Wed, 06 Sep 2023 16:21:12 +0200 In-Reply-To: References: <1507834.1694008417@sss.pgh.pa.us> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2023-09-06 at 19:34 +0530, 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=A0=C2=B5 only but not as M. Then you are using a different collation in DB2, or "upper" (which is not s= tandardized, as far as I know), is defined differently there. > So, while validating the data we have encountered this=C2=A0problem. >=20 > We want to have the data in both DB's should be similar (db2 and postgreS= QL) >=20 > In my local it is windows OS and locale is English_united_states.1252 and= in local it is converting as expected ( test=C2=B5 into TEST=C2=B5) >=20 > So, even I want to change locale i cannot change now. Since already db is= created. BTW this db is hosted in azure. >=20 > Would request to please suggest if any alternatives are there to resolve = this=C2=A0issue.=C2=A0 Specify a collation that does what you want explicitly: SELECT upper('test=C2=B5' COLLATE "C"); upper=20 =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90 TEST=C2=B5 (1 row) But then don't complain if your "=C3=B6" and "=C3=A9" are not uppercased ei= ther. Yours, Laurenz Albe