Re: postgreSQL UPPER Method is converting the character "µ" into "M" - Mailing list pgsql-general

From Sai Teja
Subject Re: postgreSQL UPPER Method is converting the character "µ" into "M"
Date
Msg-id CADBXDMUw6XUJkSJG1kbtPhkt2nR+cRcusKucY9Xcjhew=RAQDg@mail.gmail.com
Whole thread Raw
In response to Re: postgreSQL UPPER Method is converting the character "µ" into "M"  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: postgreSQL UPPER Method is converting the character "µ" into "M"
Re: postgreSQL UPPER Method is converting the character "µ" into "M"
List pgsql-general
Hi Tom Lane, Thank you for your reply!

Actually we are migrating the data from DB2 to postgreSQL. So in DB2 the upper method is converting µ as µ only but not as M.

So, while validating the data we have encountered this problem.

We want to have the data in both DB's should be similar (db2 and postgreSQL)

In my local it is windows OS and locale is English_united_states.1252 and in local it is converting as expected ( testµ into TESTµ)

So, even I want to change locale i cannot change now. Since already db is created. BTW this db is hosted in azure.

Would request to please suggest if any alternatives are there to resolve this issue. 

Thanks,
Sai Teja 



On Wed, 6 Sep, 2023, 7:23 pm Tom Lane, <tgl@sss.pgh.pa.us> wrote:
Sai Teja <saitejasaichintalapudi@gmail.com> writes:
> I am using UPPER document name for converting the text from lower case into
> upper case.
> But here for the below example
> Command:- select UPPER(testµ)
> Input :- testµ
> Output:- TESTM
> Expected output :-  TESTµ

According to https://en.wikipedia.org/wiki/Greek_alphabet
the upper-case form of µ (mu) is in fact M, so I'm not sure
what problem you have with this.  But in any case, you are
complaining in the wrong place.  This conversion is determined
by the rules of the selected locale.  If you don't like it,
choose another locale, or make your own, or try to persuade
the glibc maintainers that they are wrong.

                        regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: postgreSQL UPPER Method is converting the character "µ" into "M"
Next
From: Laurenz Albe
Date:
Subject: Re: postgreSQL UPPER Method is converting the character "µ" into "M"