El 18/02/2016 a las 04:55 p.m., Jeremy Harris escribió:
On 18/02/16 19:21, Juan Bernhard wrote:
  The message is read from a mysql database, the database is in
utf8. Exim is configured to use header_charset utf8 (this even is not a
header, but anyway, is the only place when you can configure a charset),
but exim writes the result as ISO-8859, resulting some characters not
being displayed correctly.

When I test the exim query expansion i get:
exim -be '${lookup mysql {SELECT mensaje FROM vacation WHERE usuario =
"forotecnologico"}}'
Hola, estoy de vacas.
▒▒▒▒▒.▒▒▒▒▒.▒▒▒▒▒▒▒▒▒▒▒▒▒

Try playing with -d-all+expand+lookup and see if you can track the
exact character codes coming in from the DB.  This will of course
be confused by the debug output path not being utf8-enabled, but
you might find something relevant.


Hi Jeremy, thanks for the quick answer. I did -d+all, but I cant find anything relevant (at least to me). I doesn't say anithing about charset in de debug mode. But, as you can see, it already display the char set wrong in the database answer:


[root@claudia down]# exim -d-all+expand+lookup -be '${lookup mysql {SELECT mensaje FROM vacation WHERE usuario = "forotecnologico"}}'
Exim version 4.72 uid=0 gid=0 pid=13170 D=10100
Berkeley DB: Berkeley DB 4.7.25: (September  9, 2013)
Support for: crypteq iconv() IPv6 PAM Perl Expand_dlfunc TCPwrappers OpenSSL Content_Scanning DKIM Old_Demime Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb dsearch ldap ldapdn ldapm nis nis0 nisplus passwd sqlite
Authenticators: cram_md5 cyrus_sasl dovecot plaintext spa
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Fixed never_users: 0
Size of off_t: 8
OpenSSL compile-time version: OpenSSL 1.0.1e-fips 11 Feb 2013
OpenSSL runtime version: OpenSSL 1.0.1e-fips 11 Feb 2013
configuration file is /etc/exim/exim.conf
log selectors = ffffffff 7fffffff
Reset TZ to GMT+3: time is 2016-02-18 16:59:24
trusted user
admin user
expanding: SELECT mensaje FROM vacation WHERE usuario = "forotecnologico"
   result: SELECT mensaje FROM vacation WHERE usuario = "forotecnologico"
search_open: mysql "NULL"
search_find: file="NULL"
key="SELECT mensaje FROM vacation WHERE usuario = "forotecnologico"" partial=-1 affix=NULL starflags=0
LRU list:
internal_search_find: file="NULL"
type=mysql key="SELECT mensaje FROM vacation WHERE usuario = "forotecnologico"" database lookup required for SELECT mensaje FROM vacation WHERE usuario = "forotecnologico"
MySQL query: SELECT mensaje FROM vacation WHERE usuario = "forotecnologico"
MYSQL new connection: host=localhost port=0 socket=NULL database=mail2 user=exim
lookup yielded: Hola, estoy de vacas.
▒▒▒▒▒.▒▒▒▒▒.▒▒▒▒▒▒▒▒▒▒▒▒▒
expanding: ${lookup mysql {SELECT mensaje FROM vacation WHERE usuario = "forotecnologico"}}
   result: Hola, estoy de vacas.
▒▒▒▒▒.▒▒▒▒▒.▒▒▒▒▒▒▒▒▒▒▒▒▒
Hola, estoy de vacas.
▒▒▒▒▒.▒▒▒▒▒.▒▒▒▒▒▒▒▒▒▒▒▒▒
search_tidyup called
close MYSQL connection: localhost/mail2/exim
>>>>>>>>>>>>>>>> Exim pid=13170 terminating with rc=0 >>>>>>>>>>>>>>>>


Saludos, Juan

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to