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

Re: Getting weird results with unicode table...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David B" <postgresql(at)thegatelys(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Getting weird results with unicode table...
Date: 2004-11-23 15:14:41
Message-ID: 26642.1101222881@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"David B" <postgresql(at)thegatelys(dot)com> writes:
> Two possible bugs.

> #1 Loading unicode data.

I'm thinking that the dump file probably doesn't set client_encoding,
or if it does, sets it to the wrong thing.  Is the data in the dump file
actually UTF8, or is it in some other encoding?

> select substring ( lower(title), 1, 1), count(*)
> from album
> where lower(title) > 'a%' and lower(title) <= 'e%'
> group by substring ( lower(title), 1, 1) ;

> Should get counts for 'a', 'b', 'c', 'd', 'e'.

... plus any other characters that the current locale chooses to sort
between 'a' and 'e'.  In particular I'd expect to see accented 'a' and/or
accented 'e' sort that way.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: David SchweikertDate: 2004-11-23 16:21:42
Subject: Re: select to_number('1,000', '999,999');
Previous:From: Devrim GUNDUZDate: 2004-11-23 09:02:58
Subject: Re: BUG #1320: 7.3.8 server RPM has file error

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