From: | Javier Amor Garcia <jamor(at)zentyal(dot)com> |
---|---|
To: | Marti Raudsepp <marti(at)juffo(dot)org> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Error inserting RFC1738-encoded URLs |
Date: | 2011-10-24 15:45:14 |
Message-ID: | 4EA5880A.70508@zentyal.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thanks for you reply Marti. I wil ltry to complete the description of
the problem.
I get errors like this:
Error inserting data: INSERT INTO squid_access ( bytes, event,
elapsed, rfc931, timestamp, url, method, peer, mimetype, remotehost,
code) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
ERROR: invalid byte sequence for encoding "UTF8": 0xe97469
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".
I am sending the data to the database trough the DBI perl module,
tomorrow I will make sure that the data is read as UTF8 but I think I
had previously already tried to encode this a UTF8. (not sure, it was
some weeks ago).
Anyway, with the new data you continue to think the problem is that the
data is sent with the bad encoding?.
Regards,
Javier
On 10/24/2011 01:37 PM, Marti Raudsepp wrote:
> On Mon, Oct 24, 2011 at 10:27, Javier Amor garcia<jamor(at)zentyal(dot)com> wrote:
>> sometimes I get encoding errors when inserting a s a encoded URL in a text
>> field.
>
> You forgot the most important thing: *What's* the error that you get?
>
>> http://www.formacion.aimplas.es/_Documentos/2011/FORMACIÓN%20ABIERTA/Folleto%20Especialistas%20Universitarios%20Polímeros%20ok.pdf
>
> Since I have to guess, I suspect you're sending these strings to
> Postgres in a non-UTF-8 encoding.
>
> This isn't a valid URL anyway -- you can't have unquoted "Ó" or "í"
> characters since they're not valid ASCII. But a 'varchar' field would
> accept them anyway if you send them in the right encoding.
>
> Regards,
> Marti
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Farber | 2011-10-24 16:19:08 | Adding a unique number to each record in a table |
Previous Message | Ian Harding | 2011-10-24 14:41:37 | Re: Recovery from Archive files |