[exim] exim mysql and utf8

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Juan Bernhard
Dátum:  
Címzett: exim-users
Tárgy: [exim] exim mysql and utf8
Hello list, I'm having a little trouble with charset here.
I need to configure a vacation autoreply and I cant get it work with
utf8. 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.
▒▒▒▒▒.▒▒▒▒▒.▒▒▒▒▒▒▒▒▒▒▒▒▒


But if I do:
exim -be '${lookup mysql {SELECT mensaje FROM vacation WHERE usuario =
"forotecnologico"}}' | iconv -f ISO-8859-1 -t UTF-8
Hola, estoy de vacas.
áéíóú.ÁÉÍÓÚ.ÄËÏÖÜäëïöüÑñç

It display correctly.
If i do the query by: echo SELECT mensaje FROM vacation WHERE usuario =
"forotecnologico" | mysql -u exim -p
I get the right charset. Exim is messing the result? Or is a problem of
the mysql library?

Exim mysql lookup is not built in, is loaded as a module. I compiled the
last version of exim (4.86) with mysql as a built-in look up with the
same result...

Exim version:
Exim version 4.72 #1 built 10-Oct-2014 09:23:33
Copyright (c) University of Cambridge, 1995 - 2007
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