Re: Encoding, character not shown correctly in pgAdmin or in query

From: avpro avpro <avprowebeden(at)gmail(dot)com>
To:
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Encoding, character not shown correctly in pgAdmin or in query
Date: 2014-02-15 12:38:19
Message-ID: CAAQdDnmPARva+NBUz_tWKBDP1oFJoisTf7zs1KeA8wqpMykvkA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

I was saying that after I I imported the file with LATIN1 all unrecognized
characters were replaced with "?".

On 15 February 2014 13:17, Gerald Cheves <gcheves(at)verizon(dot)net> wrote:

> 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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice
>

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Gerald Cheves 2014-02-15 13:27:26 Re: Encoding, character not shown correctly in pgAdmin or in query
Previous Message Gerald Cheves 2014-02-15 12:17:46 Re: