Обсуждение: RV: encoding problem

Поиск
Список
Период
Сортировка

RV: encoding problem

От
"Sergio Medina"
Дата:
But when I insert rows with those characters, there´s no problem. Only when
Copy files, Why is this?

Thanks

-----Mensaje original-----
De: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Enviado el: martes, 30 de noviembre de 2010 02:16 p.m.
Para: Sergio Medina
CC: pgsql-novice@postgresql.org
Asunto: Re: [NOVICE] encoding problem

"Sergio Medina" <sergioluismedina@gmail.com> writes:
> I have a server with utf8 encoding, but trying to copy a csv file
containing
> characters like ó,í,á,é,ñ in rows throws the next error.

> ERROR: secuencia de bytes no válida para codificación UTF8 0xf327

Well, it's right: that's not UTF8.  It looks like it might be LATIN1.
Figure out what encoding your data is really in, and then set
client_encoding to that before trying to load the CSV file.

            regards, tom lane


Re: RV: encoding problem

От
Tom Lane
Дата:
"Sergio Medina" <sergioluismedina@gmail.com> writes:
> But when I insert rows with those characters, there�s no problem. Only when
> Copy files, Why is this?

[ shrug... ]  You didn't say how you were doing the inserts, but I
imagine it's with a program that is generating the data in utf8.

            regards, tom lane