I use Postgres 7.1, FreeBSD 4.0

I configure, build and install it with:

./configure --enable-locale --enable-multibyte --with-perl
gmake
gmake install

initdb -E KOI8

The problem is: when database encoding and client encoding are
different then 'locale' features, such as 'upper' etc don't work. When these
two encodings are equal - all is OK.

Example, commets are marked by -->:

tolik=# \l
      List of databases
 Database  | Owner | Encoding 
-----------+-------+----------
 cmw       | cmw   | ALT
 template0 | tolik | KOI8
 template1 | tolik | KOI8
 tolik     | tolik | ALT     --> database 'tolik' has ALT (one of
                                 russian) encoding
(4 rows)

tolik=# \c
You are now connected to database tolik as user tolik.
tolik=# \encoding KOI8           --> I change client encoding to KOI8,
                                     another russian encoding
tolik=# select upper ('О©╫О©╫О©╫О©╫О©╫');  --> argument is russian word in 
                                     lowercase
 upper 
-------
 О©╫О©╫О©╫О©╫О©╫                           --> result don't change
(1 row)

tolik=# \encoding ALT            --> I set client encoding equals
                                     to DB encoding
tolik=# select upper ('О©╫О©╫О©╫О©╫О©╫');
 upper 
-------
 О©╫О©╫О©╫О©╫О©╫                           --> Now it works, result is the
                                     same word in uppercase :(
(1 row)

I did'nt observe this feature in 6.* versions of Postgres.

Any ideas? Or help?

-- 
Anatoly K. Lasareff                 Email:    tolik@aaanet.ru 
http://tolikus.hq.aaanet.ru:8080    Phone:      (8632)-710071

15 Jan 2001 18:41:13 +0300
tolik@aaanet.ru (Anatoly K. Lasareff)
locale and multibyte together in 7.1
>>>>> "AKL" == Anatoly K Lasareff <tolik@aaanet.ru> writes:


 AKL> The problem is: when database encoding and client encoding are
 AKL> different then 'locale' features, such as 'upper' etc don't work. When these
 AKL> two encodings are equal - all is OK.

I have partyally win this feature with this 'magic' way. I configure,
make, install and initdb under locale, correspondings to database
encoding. If I wont ALT encoding I use ru_RU.CP866 locale. Then all
'locale' featureas are working. But this is some strange way.

Probably there is nicer method?

-- 
Anatoly K. Lasareff                 Email:    tolik@aaanet.ru 
http://tolikus.hq.aaanet.ru:8080    Phone:      (8632)-710071

16 Jan 2001 19:29:40 +0300
tolik@aaanet.ru (Anatoly K. Lasareff)
Re: locale and multibyte together in 7.1