Re: [exim] exim mysql and utf8

Pàgina inicial
Delete this message
Reply to this message
Autor: Juan Bernhard
Data:  
A: exim-users
Assumpte: Re: [exim] exim mysql and utf8

El 18/02/2016 a las 05:09 p.m., Jeremy Harris escribió:
> On 18/02/16 19:55, Jeremy Harris wrote:
>> 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.
>
> Ah, you may need even more recent than 4.86 - which means compiling
> from the git tree master.
>
> Possibly relevant:
>
>    https://dev.mysql.com/doc/refman/5.5/en/mysql-options.html

>
> - mentions a default-character-set option you may put in a
> MySQL option file. Exim (at least recently [1]) sets the
> MYSQL_READ_DEFAULT_GROUP option flag on the DB connection,
> saying to use the "default" option group in the "my.cnf" file
> (or a specified group name, if you care).
>
> Before that commit this option flag was not set.
>
> I'd guess you need to tell it there to use utf8.
>
>
> 1] a159f203b559 - support MySQL config file option group names
>


Ill try this in a freebsd enviroment, this is a lot more updated than
linux repos.