Other Characterset to UTF8

From: "Abu Mushayeed" <amushayeed(at)hotmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Other Characterset to UTF8
Date: 2006-07-20 21:54:40
Message-ID: BAY108-F292D7506280864454B70A9D1610@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message John DeSoi 2006-07-21 01:00:09 Re: Other Characterset to UTF8
Previous Message Mr. Dan 2006-07-20 18:21:24 failing archive command