[exim] pgsql "client encoding" issue

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Mark Adams
Fecha:  
A: exim-users
Asunto: [exim] pgsql "client encoding" issue
Hi All,

exim 4.72-6, Debian squeeze.

I'm having a client encoding issue whilst trying to log headers in to
postgres using pgsql if the subject contains the pound sign (£)

I fixed other encoding issues I had by adding :rfc2047: in as follows

${quote_pgsql:rfc2047:$h_subject:}

However this doesn't seem to work for the pound sign.

Whats the best way to sort out encoding issues with postgres so anything
that comes through exim can be inserted in to postgres?

An example error is as follows (apologies for the wrapping):

2011-04-05 21:40:13 1Q7D2r-0001IE-6p H=fw.dabs.com [194.70.94.141]
Warning: ACL "warn" statement skipped: condition test deferred: PGSQL:
query failed: ERROR: invalid byte sequence for encoding "UTF8": 0xa3
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". (PGRES_FATAL_ERROR) (INSERT INTO log (t_message_id,
t_message_date, t_subject, t_recipients, t_from, t_to, t_cc, n_size)
VALUES ('1Q7D2r-0001IE-6p', '5 Apr 2011 20:40:07 -0000', 'Fantastic
Deals at dabs.com! £120 off Sony VAIO E Series Laptop!',
'itdept@???', '\"dabs.com\" <offers@???>',
'itdept@???', '', '63324'))

Regards,
Mark