Skip site navigation (1) Skip section navigation (2)

Re: UNIX vs Windows LC CTYPE and UPPER mu

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "service prodat *EXTERN*" <service(at)prodat-sql(dot)de>,<pgsql-admin(at)postgresql(dot)org>
Subject: Re: UNIX vs Windows LC CTYPE and UPPER mu
Date: 2012-04-19 08:02:54
Message-ID: D960CB61B694CF459DCFB4B0128514C207C33E9C@exadv11.host.magwien.gv.at (view raw or flat)
Thread:
Lists: pgsql-admin
service prodat wrote:
> first: i hope im right here in this mailing list.

Yes.

> My problem:
> 
> We have several Postgre servers 9.0.4, one on Windows Server 2008 R2 and
> others on different UNIX/Linux systems.
> Windows: LC_CTYPE = 'German, Germany'
> UNIX: LC_CTYPE='de_DE.UTF-8'
> (so LC_COLLATE is too)
> 
> on both systems
> ENCODING = 'UTF8'
> 
> Now the function UPPER('µ') works right on Windows, giving me 'µ'
> (unicode = 181 respectivly U+00B5).
> On Unix I get a char like M (unicode = 924 respectivlyU+039C), the GREEK
> CAPITAL LETTER MU
> But we are not in Greek.
> 
> Is this a Unix based problem with a wrong local setup (we dont think so,
> servers local working on other german letters like ä, ö, ü and UPPER too),
> or a Unix local problem in principle,
> or a wrong postgre server setup,
> or a postgre bug?
> 
> Or is this a feature, not a bug.
> 
> We dont know where to search or where to fix something.

PostgreSQL uses the operating system's towupper(3) function to
convert letters to upper case.

After looking at the UNICODE character list I tend to agree that
code point 0xB5 (MICRO SIGN) should not be converted to
0x39C (GREEK CAPITAL LETTER MU).  There's 0x3BC for GREEK SMALL LETTER MU.

Bug or not, the operating systems seem to differ on this.
It is not PostgreSQL's doing.

Yours,
Laurenz Albe

In response to

Responses

pgsql-admin by date

Next:From: Albe LaurenzDate: 2012-04-19 08:11:40
Subject: Re: Clarification on start/stop backup
Previous:From: jenopobDate: 2012-04-19 02:34:41
Subject: Re: How to auto swtich the roles of primary and standby

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group