Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WEeC7-00068I-Ge for pgsql-novice@arkaria.postgresql.org; Sat, 15 Feb 2014 12:18:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WEeC6-00015H-G5 for pgsql-novice@arkaria.postgresql.org; Sat, 15 Feb 2014 12:18:06 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WEeC5-00015B-Ov for pgsql-novice@postgresql.org; Sat, 15 Feb 2014 12:18:05 +0000 Received: from nm19-vm4.access.bullet.mail.bf1.yahoo.com ([216.109.115.99]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WEeC2-0006wT-Qe for pgsql-novice@postgresql.org; Sat, 15 Feb 2014 12:18:04 +0000 Received: from [66.196.81.157] by nm19.access.bullet.mail.bf1.yahoo.com with NNFMP; 15 Feb 2014 12:18:01 -0000 Received: from [98.139.244.53] by tm3.access.bullet.mail.bf1.yahoo.com with NNFMP; 15 Feb 2014 12:18:01 -0000 Received: from [127.0.0.1] by smtp115.sbc.mail.bf1.yahoo.com with NNFMP; 15 Feb 2014 12:18:01 -0000 X-Yahoo-Newman-Id: 868597.55685.bm@smtp115.sbc.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: yYmx7OAVM1mw6Jr45MfaTNDZ7d0okd67LJoRgHLjog66DHS 7zxQRSra5DheG9iawuHGJ8jiVlQBdXqi6LtgYyG_J8JYmuPDuEPCXF01Pg28 _jPBOmY.cjtBrYyA_7vuMReYbNYrHsEyHoGSE4KSd10Glhhk2msaGxwf6_P0 l5O8a75aaXD.iUpoPvOqxM.NEr3izhpDKbmUKPI4DivJkWHnZHXhTrb4B_nv hXEKrEA9dhPXZGtoH5xunF9sS7ANuo4dv5D1oo1MoDReMU.O7a4ZQHkjA8pb gKim_Is6RWjTQTNnVEedrIgaZhN8kjLd_E3YTlZTVxmX7vuWM1XglrCXzeiE IZ_mpwVTRTYK2tp4gzE7LBkarnQhbZAlx4tea8iG_osCMhaZL9fJlkJ6w..S 2jlKOEEEmXdp0chYfJIdUXKeYzeDhPU0M42_qFBOMCDo_Frxijm69NVAwOme g3BqhJq7EMmYkDcXcwAM89sgK05a3ts2egvCWveW_tWWXTkvdxLiO3fO_yh9 lxQXkPPY9Eyuu2zeviVtnTgmmB.h6I.V1K1Fz7CwmBZVedTvrImz2Cb84IdB 0KYMYkZC9 X-Yahoo-SMTP: GMTumJaswBChrtRTn8gqZTOmsBrkG0IQOjLPC2F8grM- X-Rocket-Received: from [192.168.1.47] (gcheves@173.77.194.231 with plain [98.139.221.191]) by smtp115.sbc.mail.bf1.yahoo.com with SMTP; 15 Feb 2014 04:18:01 -0800 PST Message-ID: <52FF5AEA.5000602@verizon.net> Date: Sat, 15 Feb 2014 07:17:46 -0500 From: Gerald Cheves User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: "pgsql-novice@postgresql.org" Subject: Re: References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 1.6 (+) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-novice Precedence: bulk Sender: pgsql-novice-owner@postgresql.org I had a similar problem. Try different encodings like this command: set client_encoding to 'LATIN1'; Then: COPY filename FROM 'file/path/filename.csv' WITH DELIMITER ',' CSV HEADER; On 2/15/2014 6:18 AM, avpro avpro wrote: > > Hello all, > > In postgresql 9.3 using pgAdmin, I created a table for my application > developed in Qt Creator. > the table contains: > idstudent - pk > name > country > town > street > > > I would like to import a csv file containing all the info about these > students. The file was saved/encoded in excel with UTF8 characters. > > When I'm importing my file in psql, using the encoding UTF8, I receive > the following error for each character not recognized: > "error: invalid byte sequence for encoding "UTF8": ... " followed by > the character code > > I tried to import the file using SQL_ASCII, I got similar errors. > I tried to import the file using MULE_INTERNAL and it worked, but the > characters not recognized are not shown correct in pdAdmin and in my > application when query is executed. For example after I imported the > file with LATIN1 all unrecognized characters were replaced with "?". > > Any suggestion what encoding shall I use to display the characters > correctly? > > note: the student's names and addresses are written using characters > from North Europe, Eastern EU, Russia, South America, Asia, etc. > everywhere. > > Thank you for your input. -- siamo arrivati sani e salvi -- Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-novice