pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
UNIX vs Windows LC CTYPE and UPPER mu
3+ messages / 3 participants
[nested] [flat]

* UNIX vs Windows LC CTYPE and UPPER mu
@ 2012-04-18 12:03  service prodat <service@prodat-sql.de>
  0 siblings, 1 reply; 3+ messages in thread

From: service prodat @ 2012-04-18 12:03 UTC (permalink / raw)
  To: pgsql-admin

Hello,

first: i hope im right here in this mailing list.

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.

Thank you for concerning,
Dominik



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: UNIX vs Windows LC CTYPE and UPPER mu
@ 2012-04-19 08:02  Albe Laurenz <laurenz.albe@wien.gv.at>
  parent: service prodat <service@prodat-sql.de>
  0 siblings, 1 reply; 3+ messages in thread

From: Albe Laurenz @ 2012-04-19 08:02 UTC (permalink / raw)
  To: service prodat *EXTERN* <service@prodat-sql.de>; 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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: UNIX vs Windows LC CTYPE and UPPER mu
@ 2012-04-19 18:21  Peter Eisentraut <peter_e@gmx.net>
  parent: Albe Laurenz <laurenz.albe@wien.gv.at>
  0 siblings, 0 replies; 3+ messages in thread

From: Peter Eisentraut @ 2012-04-19 18:21 UTC (permalink / raw)
  To: Albe Laurenz <laurenz.albe@wien.gv.at>; +Cc: service prodat *EXTERN* <service@prodat-sql.de>; pgsql-admin

On tor, 2012-04-19 at 10:02 +0200, Albe Laurenz wrote:
> 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.

http://www.unicode.org/Public/UNIDATA/UnicodeData.txt has:

00B5;MICRO SIGN;Ll;0;L;<compat> 03BC;;;;N;;;039C;;039C

and

039C;GREEK CAPITAL LETTER MU;Lu;0;L;;;;;N;;;;03BC;

So this mapping is correct.

Case conversion is not necessarily round-trip.




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2012-04-19 18:21 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-04-18 12:03 UNIX vs Windows LC CTYPE and UPPER mu service prodat <service@prodat-sql.de>
2012-04-19 08:02 ` Albe Laurenz <laurenz.albe@wien.gv.at>
2012-04-19 18:21   ` Peter Eisentraut <peter_e@gmx.net>

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