Re: questions on multibyte

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux