Hi,
here is a brief instruction:
1. get 6.5 distribution. I suppose you can get it from my mirror:
ftp.sai.msu.su/pub/unix/database/pgsql/postgresql-6.5.tar.gz
2. untar, cd to src/ and run
./configure --prefix=/usr/local/pgsql --enable-locale --with-mb=KOI8
3. make, make install, make install-man
4. initdb (look at the options for spec. default encoding)
5. fill some database
Now you can use set CLIENT_ENCODING TO 'WIN'|'KOi8'|'ALT'
to translate encodings on fly
I thinkl this is more fexible than RECODE feature where you have to have
hardcoded IP-Encoding pairs.
Regards,
Oleg
On Fri, 9 Jul 1999 [EMAIL PROTECTED] wrote:
> Date: Fri, 09 Jul 1999 11:24:19 +0400 (MSD)
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: [ADMIN] cyrillic
>
> Hi!
>
> On 08-Jul-99 Oleg Broytmann wrote:
> > Hi!
> >
> > On Thu, 8 Jul 1999 [EMAIL PROTECTED] wrote:
> >> Can user choose its locale while fetching data from postgresql (6.5)?
> >
> > Sure! Not only locale, but KOI8<=>CP12521 converting on th fly!!!
> >> What I mean:
> >>
> >> I have PGSQL in multiuser environment. As ususal in russia some users prefer
> >> KOI8-R but other prefer CP-1251 code pages... :-(
> >> Sounds good to make SET CODEPAGE='...' operator to change PGSQL senntings by
> >> user at each user session. Is it possible? How?
> >
> > Look into doc directory. Read details about compiling and using Postgres
> > with Multibyte support. There are even special instructions for cyrillic
> > users.
>
> yeah.. I read dox. So as I understand correctly:
> - I can set locale via environment as LC_CTYPE etc...
> - I can set source code page via $PG_DATA/charset.conf
> - I can set charset for clients via $PG_DATA/charset.conf by client's IP
> Is what all?
> All of above I can change only restarting postgres :-(
> I can't change code page for conversion by server IP.
> I can't change client code page for conversion DYNAMICALLY (via SET command 4x).
>
> I explain by example:
> I have www-host with some users. Some of them use koi8 and other use cp-1251 as
> source cp. I cant select them by IP! They are DIALUP users with dynamic IP! I
> prefer host cp as koi, well... I happy that koi->windows conversion is
> possible. Best way I see is to permit windows user use the command like
> SET charset=win
> to enable koi->win translation. As I understand he can exec this command once
> per connection. Because we support persistent connections should be command
> SET charset=koi
> too ;-)
>
> My problem is:
> I cant guess that charset the client use...
>
> SKiller
> --------------------------
> Sergei Keler
> WebMaster of "ComSet"
> E-Mail: [EMAIL PROTECTED]
> http://www.comset.net
> --------------------------
>
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: [EMAIL PROTECTED], http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83