Re: postgreSQL UPPER Method is converting the character "µ" into "M"

Поиск
Список
Период
Сортировка
От Erik Wienhold
Тема Re: postgreSQL UPPER Method is converting the character "µ" into "M"
Дата
Msg-id 60182986.61.1694010208406@office.mailbox.org
обсуждение исходный текст
Ответ на postgreSQL UPPER Method is converting the character "µ" into "M"  (Sai Teja <saitejasaichintalapudi@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: postgreSQL UPPER Method is converting the character "µ" into "M"
Следующее
От: Albrecht Dreß
Дата:
Сообщение: Q: inet operators for IPv4 encapsulated in IPv6