I have problems with character encoding.

The server is a Debian and there is a PostgreSQL version 8.3. I tested with the following settings can not run an upload of data:

Configuration 1:
server_encoding -> UTF8
LC_COLLATE -> es_ES.utf8
LC_CTYPE -> es_ES.utf8
Configuration 2:
server_encoding -> LATIN1
LC_COLLATE -> Spanish
LC_CTYPE -> Spanish

What should I do to load data correctly? What is the configuration correctly?

Could someone help me?
Thanks and regards.