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

Re: problems when comparing text with special chars

From: <me(at)alternize(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: problems when comparing text with special chars
Date: 2005-09-04 23:11:50
Message-ID: 001401c5b1a6$09eb4bf0$8d02a8c0@iwing (view raw or flat)
Thread:
Lists: pgsql-novice
well, all other functions (at least) seem to work just fine. the data is 
correctly stored including the umlaut and other special chars, only when 
applying lower() / upper() they are being stripped.

the installer (yes, its the v8.0.3 windows version) had me choose the 
following db encoding, which also matches the server's win2k3 environement. 
this seems right to me:
LC_COLLATE:                           German_Switzerland.1252
LC_CTYPE:                             German_Switzerland.1252

the DB was created with the characterset UNICODE to have full support for 
foreign characters (i.e. japanese and stuff).

           List of databases
    Name    |     Owner     | Encoding
------------+---------------+-----------
 outnow     | db_outnow     | UNICODE
 template0  | sa            | SQL_ASCII
 template1  | sa            | SQL_ASCII


the mentioned localisation chapter in the documentation didn't give me a 
hint what's wrong here, but i also must admit i'm new to this localisation 
stuff - mssql didn't need to be configured in that aspect ;-)
so, any pointers what encoding and locale types i must set to get the system 
to run smooth would be very appreciated... what is the correct encoding to 
choose to have the most flexibilities when storing western as well as 
eastern unicode characters?

thanks in advance,
thomas



----- Original Message ----- 
From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: <me(at)alternize(dot)com>
Cc: <pgsql-novice(at)postgresql(dot)org>
Sent: Monday, September 05, 2005 12:49 AM
Subject: Re: [NOVICE] problems when comparing text with special chars


> <me(at)alternize(dot)com> writes:
>> SELECT lower('zwiebelb├Ącker') = 'zwiebelb├Ącker'
>> => false (which is the wrong answer, obviously)
>
> If you think that's the wrong answer, then you need to initdb in a
> locale in which it's the right answer.  Also take care that you are
> using the database encoding that the locale expects.  There is some
> discussion of these issues in the "localization" chapter of the
> manual.
>
> regards, tom lane
> 



In response to

Responses

pgsql-novice by date

Next:From: Tom LaneDate: 2005-09-04 23:33:16
Subject: Re: problems when comparing text with special chars
Previous:From: Tom LaneDate: 2005-09-04 22:49:37
Subject: Re: problems when comparing text with special chars

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