questions on multibyte

Поиск
Список
Период
Сортировка
От Karthikeyan Sundaram
Тема questions on multibyte
Дата
Msg-id BAY131-F407170722AB60F5A0B3492B09B0@phx.gbl
обсуждение исходный текст
Ответ на Re: questions on multibyte  (Michael Fuhr <mike@fuhr.org>)
Ответы Re: questions on multibyte  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-admin
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=WLMTAG


В списке pgsql-admin по дате отправления:

Предыдущее
От: "Chad Wagner"
Дата:
Сообщение: Re: blobs
Следующее
От: "Alexander B."
Дата:
Сообщение: Re: Install Tsearch2