pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathalie Boulos <nathalieboulos@hotmail.com>
To: pgsql-admin@postgresql.org
Subject: Re: Import/export CSV files to postgres
Date: Thu, 03 Apr 2003 11:10:29 +0300
Message-ID: <F159k4hPO1eVGiSu5C500001bb0@hotmail.com> (raw)


Hi,

well the answer to my question is quite easy. I'm posting it in case someone 
needs it one day:

there's a function in PHP utf8_decode() that converts to ISO-8859-1. This 
should be used and gives successful result.

Regards
Nat

>
>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
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>subscribe-nomail command to majordomo@postgresql.org so that your
>message can get through to the mailing list cleanly


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




view thread (2+ messages)

Message-ID: <F159k4hPO1eVGiSu5C500001bb0@hotmail.com>
Permalink:  ../F159k4hPO1eVGiSu5C500001bb0@hotmail.com/
Also on:    postgresql.org/message-id/F159k4hPO1eVGiSu5C500001bb0@hotmail.com

 · 

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: nathalieboulos@hotmail.com
  Subject: Re: Import/export CSV files to postgres
  In-Reply-To: <F159k4hPO1eVGiSu5C500001bb0@hotmail.com>
  References: <F159k4hPO1eVGiSu5C500001bb0@hotmail.com>

* 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