Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 739E29FB1BE for ; Sun, 4 Feb 2007 19:44:16 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 38644-02 for ; Sun, 4 Feb 2007 19:44:08 -0400 (AST) X-Greylist: delayed 00:17:27.185875 by SQLgrey-1.7.4 Received: from mail13.bluewin.ch (mail13.bluewin.ch [195.186.18.62]) by postgresql.org (Postfix) with ESMTP id D4D8C9FA589 for ; Sun, 4 Feb 2007 19:44:12 -0400 (AST) Received: from [192.168.1.74] (85.0.195.76) by mail13.bluewin.ch (Bluewin 7.3.121) id 45C3196900088F20 for pgsql-admin@postgresql.org; Sun, 4 Feb 2007 23:26:42 +0000 From: Ivo Rossacher To: pgsql-admin@postgresql.org Subject: Re: [SQL] Question regarding multibyte. Date: Mon, 5 Feb 2007 00:26:42 +0100 User-Agent: KMail/1.8.2 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200702050026.42279.rossacher@bluewin.ch> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/52 X-Sequence-Number: 24517 Am Sonntag, 4. Februar 2007 22.34 schrieb Karthikeyan Sundaram: > Hi, > > I am new to postgres. I asked a question regarding multibyte display.= =20 > I got only one response. Which was correct and about complet when taking the amount of information=20 given into account. So nobody else did see a need for an other answer. > Hence, I am re-iterating the question again to a larger audience. > > We are using 8.2 release of postgres. Recently we converted our database > to multibyte on our dev machine. we want to test the following. > > 1) How will I insert multibyte from our php? Do we need to use any > special encoding? You need to specify the client encoding of your php installation. (the last= =20 time I used it I think it was Latin1 for me) So after the connection is=20 established send something like "set client_encoding=3D'LATIN1'" to the ser= ver.=20 =46rom then on the server will automatically convert between the client and= the=20 server encoding for you. > 2) I am using psql command line to get the data into a flat file and > push to our data warehouse > We use IBM redbrick warehouse. Here you need to find a way which makes your shell and the data warehouse=20 happy. It depends on the data you have to transfer what will give the best= =20 solution. Here a very simple one which might create troubles in some specia= l=20 cases: If you know the encoding your ware house is expecting just set the client=20 encoding of the psql to what you ware house expects. Now the ware house=20 should be able to read what from psql comes where mostpossible at the conso= le=20 you will not get the correct display anymore whit this setup. > 3) If I have multibyte, I know the output from the psql will scatter to > many lines. How can we avoid that. What is the sql command ? I need 1 > record per row to supply to our warehouse. This is most probably only a problem of the editor/console related to wrong= =20 encoding settings and does not have anything to do with the real problem. If this is not the case you have to escape the linebreakes in a way the=20 warehouse understands (iconv, recode,...). > > Can somebody help me? I hope so. Best regards Ivo Rossacher > > Regards > skarthi > > _________________________________________________________________ > Valentine=92s Day -- Shop for gifts that spell L-O-V-E at MSN Shopping > http://shopping.msn.com/content/shp/?ctId=3D8323,ptnrid=3D37,ptnrdata=3D2= 4095&tco >de=3Dwlmtagline > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org