Import/export CSV files to postgres

From: "Nathalie Boulos" <nathalieboulos(at)hotmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Import/export CSV files to postgres
Date: 2003-04-02 12:33:20
Message-ID: F105f41lQvQc0MurPFK0000a5d5@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

i'm importing and exporting CSV files to fill in tables on postgres 7.3.2
via PHP-4.2.2 (web interface)
The database uses UTF-8 encoding and MS-office uses ISO-8859-1.

When i import a CSV file to the DB, I execute the "recode" command to do the
ISO>UTF-8 conversion, after uploading it. Then the CSV is successfully
inserted in the DB.

The problem is on the export level:
the PHP script writes a CSV file to the disk. This file is UTF-8. It cannot
be read properly in excel. "Recode" in the oposite way (UTF-8>ISO) is
useless.

Does anyone know what I should do to be able to see the exported CSV in
MS-Excel correctly??

I would greatly appreciate any suggestion.

Thanks in advance.
Regards
Nathalie

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail

Responses

  • Outer Join at 2003-04-02 14:41:40 from Andrés Repossi

Browse pgsql-admin by date

  From Date Subject
Next Message lists 2003-04-02 14:24:45 Re: pg_dump problem
Previous Message Raquel Vieira 2003-04-02 09:46:17 Vacuumdb