On Wed, Apr 21, 2010 at 10:16 AM, José Fermín Francisco Ferreras
<josefermi...@hotmail.com> wrote:
> Buen día, estoy por hacer un copy de un archivo CSV y a la hora de
> ejecutarlo me lanza el siente error:
>
> ERROR:  invalid byte sequence for encoding "UTF8": 0xff
> HINT:  This error can also happen if the byte sequence does not match the
> encoding expected by the server, which is controlled by "client_encoding".
> CONTEXT:  COPY tabla, line 1
>
>
> ********** Error **********
>
> ERROR: invalid byte sequence for encoding "UTF8": 0xff
> SQL state: 22021
> Hint: This error can also happen if the byte sequence does not match the
> encoding expected by the server, which is controlled by "client_encoding".
> Context: COPY tabla, line 1
>
>
> Estos son los datos de la base de datos:
>
>
> CREATE DATABASE basededatos
>   WITH OWNER = postgres
>        ENCODING = 'LATIN1'
>        LC_COLLATE = 'C'
>        LC_CTYPE = 'C'
>        CONNECTION LIMIT = -1;
>
>
> Sistema Operativo: windows XP
> Postgresql: 8.4.3
>
> Cambie el parametro: client_encoding = 'latin1', pero nada de nada.
>
> Alguien ha podido hacer algun cambio.
>
>

Que raro,
¿el script o herramienta con la que estas haciendo el COPY no estará
haciendo un SET client_encoding = 'UTF8'?

Podes probar ejecutar antes del COPY un SET client_encoding = 'latin1'

Además, podrías crear la base de datos con el encoding WIN1252, que
funciona mejor con aplicaciones windows legadas.

http://www.arpug.com.ar/trac/wiki/PreguntasFrecuentes#ComocrearbasesdedatosconcodificaciónLatin1

Sds

Mariano Reingart
http://www.arpug.com.ar
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com
--
TIP 6: ¿Has buscado en los archivos de nuestra lista de correo?
               http://archives.postgresql.org/pgsql-es-ayuda

Responder a