pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Karthikeyan Sundaram <skarthi98@hotmail.com>
To: mike@fuhr.org
Cc: pgsql-admin@postgresql.org
Subject: questions on multibyte
Date: Thu, 01 Feb 2007 21:32:22 -0800
Message-ID: <BAY131-F407170722AB60F5A0B3492B09B0@phx.gbl> (raw)
In-Reply-To: <20070202023559.GA90988@winnie.fuhr.org>

Hi Michael Fuhr,

    Thanks for replying. Here is the information given below.

1) I am using 8.2 version
2) My database ise encoded as UTF-8 and client encoding is as "SET 
client_encoding = 'UNICODE';"
3) We have a portal that are proposed to accept multibyte.  We are using PHP 
modules.  Do we need to convert to UTF-8 before inserting in PHP?
4) We are using IBM redbrick data warehouse which is also set to UTF-8
5) I am using a select statement with an \o output to a flat file with pipe 
as delimeter.  Then I am using a rb_tmu utility supplied by IBM to load into 
the redbrick warehouse database.  When I use a select statement where the 
column data contains Korean, Japanese and chinese character, they were 
display fine in the PGAdmin GUI.  But when I use a select statement to 
convert to flat file, then it's give junk chars spread across many lines. My 
requirement is one line one record.

   for example
    select address1 from address where create_date > $date_time

   In this the address1 can contain multiple language char set.
   should I use any specific command for UTF-8 so that it can convert and 
put into oneline in the output file.

   As I am new to postgres, I don't know much command.  Eventhough I have 
good experience in oracle, In oracle, we say NLS_LANG, UTF-8 will put them 
in one line.  Is there a similar command
in postgres. I am learning postgres.  Please help

Regards
skarthi



>From: Michael Fuhr <mike@fuhr.org>
>To: Karthikeyan Sundaram <skarthi98@hotmail.com>
>CC: pgsql-admin@postgresql.org
>Subject: Re: [ADMIN] questions on multibyte
>Date: Thu, 1 Feb 2007 19:35:59 -0700
>
>On Thu, Feb 01, 2007 at 07:01:31AM -0800, Karthikeyan Sundaram wrote:
> > 1) How will I insert multibyte from insert statement?  I figured out a 
>way
> > to insert multibyte, but want general opinion.
>
>If you have UTF-8 data then treat it just like any other text string
>and make sure client_encoding is set to 'UTF-8' or one of its aliases.
>If the data is in some other encoding then set client_encoding
>appropriately and the database will automatically convert the data
>to the server's encoding.
>
> > 2) I want the data to be transferred to warehouse.
>
>Do you mean a data warehouse?  What DBMS is the warehouse using?
>What character encoding does it use?  UTF-8 or something else?
>
> > 3) I login to psql and do a select the multibyte. (I did a plain 
>select).
> > and push to a flat file so that the warehouse will upload. The data 
>appread
> > to be scatterd to multiple lines which I am not able to insert into my
> > warehouse. How will display the multibyte chars from psql command line?
>
>How did you "push to a flat file"?  Did you use COPY or psql's
>\copy?  Does the data contain linefeeds and/or carriage returns?
>Does the warehouse or your display understand UTF-8?  If not then
>you might need to use client_encoding or a program like iconv or
>uconv to convert the data to another encoding.
>
>--
>Michael Fuhr
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly

_________________________________________________________________
Turn searches into helpful donations. Make your search count. 
http://click4thecause.live.com/search/charity/default.aspx?source=hmemtagline_donation&FORM=WLMT...




view thread (4+ messages)  latest in thread

Message-ID: <BAY131-F407170722AB60F5A0B3492B09B0@phx.gbl>
Permalink:  ../BAY131-F407170722AB60F5A0B3492B09B0@phx.gbl/
Also on:    postgresql.org/message-id/BAY131-F407170722AB60F5A0B3492B09B0@phx.gbl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: skarthi98@hotmail.com, mike@fuhr.org
  Subject: Re: questions on multibyte
  In-Reply-To: <BAY131-F407170722AB60F5A0B3492B09B0@phx.gbl>
  References: <20070202023559.GA90988@winnie.fuhr.org> <BAY131-F407170722AB60F5A0B3492B09B0@phx.gbl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox