pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Abu Mushayeed <amushayeed@hotmail.com>
To: pgsql-admin@postgresql.org
Subject: Other Characterset to UTF8
Date: Thu, 20 Jul 2006 14:54:40 -0700
Message-ID: <BAY108-F292D7506280864454B70A9D1610@phx.gbl> (raw)

We just upgraded our database from LAIN1 to UTF8 and some of the data 
imports were failing due to character set mismatch. So, after reading the 
documentation, here is what we are doing. According to the documentation it 
says that the database does automatic characterset conversion. So based on 
this fact, we are doing the following at the psql prompt:

1. set client_encoding = 'LATIN1';
2. COPY <table_name> FROM '<dir_path/file_name' with NULL as ''

The data gets into the database. The datbase has some inbuilt functions that 
translates the data from LATIN1 to UTF8.

The question is it works but is this correct?

Thanks
Abu





view thread (2+ messages)  latest in thread

Message-ID: <BAY108-F292D7506280864454B70A9D1610@phx.gbl>
Permalink:  ../BAY108-F292D7506280864454B70A9D1610@phx.gbl/
Also on:    postgresql.org/message-id/BAY108-F292D7506280864454B70A9D1610@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: amushayeed@hotmail.com
  Subject: Re: Other Characterset to UTF8
  In-Reply-To: <BAY108-F292D7506280864454B70A9D1610@phx.gbl>
  References: <BAY108-F292D7506280864454B70A9D1610@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