Problems with lower('�')

Started by Vegard Muntheover 23 years ago3 messagesgeneral
Jump to latest
#1Vegard Munthe
vegard@copyleft.no

'SELECT lower('�')' returns �. I have tried server_encoding and
client_encoding LATIN1 and ASCII.

I do not have the same problem on my GNU/linux server with the same
pgsql setup.

Does anyone have a clue to how I can fix this problem?

Server:
-------
FreeBSD 4.4-RELEASE

PostGreSQL:
-----------
7.1.3
7.2.3

Pgsql env:
----------
USER=pgsql
MAIL=/var/mail/pgsql
HOME=/var/db/pgsql
PGLIB=/usr/local/lib
PGDATESTYLE=ISO
TERM=vt320
BLOCKSIZE=K
PATH=/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/var/db/pgsql/bin
SHELL=/bin/sh
LC_ALL=no_NO.ISO_8859-1
PGDATA=/var/db/pgsql/data

/usr/share/locale has amung other dirs:
---------------------------------------
no_NO.ISO_8859-1/
la_LN.ISO_8859-1/

-- Vegard Munthe

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Vegard Munthe (#1)
Re: Problems with lower('�')

Vegard Munthe <vegard@copyleft.no> writes:

'SELECT lower('�')' returns �. I have tried server_encoding and
client_encoding LATIN1 and ASCII.

The behavior of lower() is driven by locale, not encoding.
Unfortunately you'll need to re-initdb to change the database locale.

regards, tom lane

#3Vegard Munthe
vegard@copyleft.no
In reply to: Tom Lane (#2)
Re: Problems with lower('�')

'SELECT lower('�')' returns �. I have tried server_encoding and
client_encoding LATIN1 and ASCII.

The behavior of lower() is driven by locale, not encoding.
Unfortunately you'll need to re-initdb to change the database locale.

Ok. Thank you very much.

-- Vegard Munthe