Auteur: Juan Bernhard Date: À: exim-users Sujet: [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...