X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 86043476304 for ; Thu, 3 Apr 2003 03:11:03 -0500 (EST) Received: from hotmail.com (f159.pav1.hotmail.com [64.4.31.159]) by postgresql.org (Postfix) with ESMTP id 72E5F4762A2 for ; Thu, 3 Apr 2003 03:10:32 -0500 (EST) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 3 Apr 2003 00:10:29 -0800 Received: from 193.227.168.171 by pv1fd.pav1.hotmail.msn.com with HTTP; Thu, 03 Apr 2003 08:10:29 GMT X-Originating-IP: [193.227.168.171] X-Originating-Email: [nathalieboulos@hotmail.com] From: "Nathalie Boulos" To: pgsql-admin@postgresql.org Subject: Re: Import/export CSV files to postgres Date: Thu, 03 Apr 2003 11:10:29 +0300 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 03 Apr 2003 08:10:29.0918 (UTC) FILETIME=[7DC55BE0:01C2F9B8] X-Spam-Status: No, hits=-5.8 required=5.0 tests=BAYES_10 version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/33 X-Sequence-Number: 8188 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