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

Re: Strange query results with invalid multibyte

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Strange query results with invalid multibyte
Date: 2006-09-28 18:14:14
Message-ID: 27700.1159467254@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-general
Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl> writes:
> On Wed, 2006-09-27 at 14:58 -0400, Tom Lane wrote:
>> LANG=en_US locale charmap

> The working machine says: ISO-8859-1
> The not working machine says: ISO-8859-1

OK, so the problem is that you have a locale that expects ISO-8859-1
encoding, but the database is set to UTF8 encoding, and that means
it may contain characters that the locale can't deal with.
Locale-dependent operations ... like upper() ... will fail when that
happens.

If we had a more reliable way of telling what encoding the locale
expects, we'd probably forbid creation of databases with incompatible
encodings.

> I still do not understand what is happening and maybe more important,
> how I can solve this (without re-installing the OS / database).

If you want to use UTF8 then you're stuck with a re-initdb I'm afraid.

			regards, tom lane

In response to

pgsql-general by date

Next:From: BenDate: 2006-09-28 19:02:34
Subject: contrib/levenshtein() has a bug?
Previous:From: Joost KraaijeveldDate: 2006-09-28 18:09:28
Subject: Re: Strange query results with invalid multibyte

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