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

From Erik Wienhold
Subject Re: postgreSQL UPPER Method is converting the character "µ" into "M"
Date
Msg-id 60182986.61.1694010208406@office.mailbox.org
Whole thread Raw
In response to postgreSQL UPPER Method is converting the character "µ" into "M"  (Sai Teja <saitejasaichintalapudi@gmail.com>)
List pgsql-general
On 06/09/2023 15:42 CEST Sai Teja <saitejasaichintalapudi@gmail.com> wrote:

> 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µ
>
> Here, that character is converting into M which should not be case
> The postgreSQL is hosted in Linux Machine which is using Locale_ctype:- en_US_utf.8

Use can use collation C or ucs_basic if you want to uppercase ASCII only:

    postgres=# SELECT upper('testµ' COLLATE "C");
     upper
    -------
     TESTµ
    (1 row)

--
Erik



pgsql-general by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: postgreSQL UPPER Method is converting the character "µ" into "M"
Next
From: Albrecht Dreß
Date:
Subject: Q: inet operators for IPv4 encapsulated in IPv6