pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Erik Wienhold <ewie@ewie.name>
To: Sai Teja <saitejasaichintalapudi@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: postgreSQL UPPER Method is converting the character "µ" into "M"
Date: Wed, 6 Sep 2023 16:23:28 +0200 (CEST)
Message-ID: <60182986.61.1694010208406@office.mailbox.org> (raw)
In-Reply-To: <CADBXDMXKnWKVY=5_q0Ww79dXd3e9x1M2t0S_ivVhk4VAma_Y0A@mail.gmail.com>
References: <CADBXDMXKnWKVY=5_q0Ww79dXd3e9x1M2t0S_ivVhk4VAma_Y0A@mail.gmail.com>

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





view thread (15+ messages)  latest in thread

Message-ID: <60182986.61.1694010208406@office.mailbox.org>
Permalink:  ../60182986.61.1694010208406@office.mailbox.org/
Also on:    postgresql.org/message-id/60182986.61.1694010208406@office.mailbox.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ewie@ewie.name, saitejasaichintalapudi@gmail.com
  Subject: Re: postgreSQL UPPER Method is converting the character "µ" into "M"
  In-Reply-To: <60182986.61.1694010208406@office.mailbox.org>
  References: <CADBXDMXKnWKVY=5_q0Ww79dXd3e9x1M2t0S_ivVhk4VAma_Y0A@mail.gmail.com> <60182986.61.1694010208406@office.mailbox.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox