copy data from utf16 csv file

Started by Shaneover 20 years ago2 messagesgeneral
Jump to latest
#1Shane
shane-pgsql@cm.nu

Hello all,

I have some CSV data I'd like to import into a PG table
using \copy from csv but the file is encoded in utf16le
format. It's a google adsense CSV file in case anyone has
had to work with these. Can anyone suggest how I can
either get these into PG directly or massage the file so as
to be compatable?

Thanks,
Shane
--
http://www.cm.nu/~shane/

#2Peter Wiersig
peter@friesenpeter.de
In reply to: Shane (#1)
Re: copy data from utf16 csv file

On Thu, Oct 27, 2005 at 03:30:43PM -0700, Shane wrote:

Can anyone suggest how I can either get these into PG directly
or massage the file so as to be compatable?

To my knowledge the only Unicode encoding used by Postgres is
utf-8.

Try 'recode' or 'iconv' on unix-like systems. A better text editor
can convert on MS Windows.

Peter