Re: [exim] Exim and MySQL with UTF-8 encoding

Top Page
Delete this message
Reply to this message
Author: Jasen Betts
Date:  
To: exim-users
Subject: Re: [exim] Exim and MySQL with UTF-8 encoding
On 2017-11-09, Jasen Betts <jasen@???> wrote:
> On 2017-11-09, Jeremy Harris <jgh@???> wrote:
>> On 08/11/17 21:15, Yves Goergen wrote:
>>> But the problem is that Exim doesn't talk to the MySQL server with UTF-8
>>> so it prevents using all that stuff. Instead, it uses some 8-bit
>>> encoding. I can see this in the reply message: It contains parts like
>>> =FC for "ü" where it should be at least two bytes.
>>
>> That "=FC" might be an RFC-2047 encoded byte, perhaps?
>
> or quoted-printable in a message-body?
>
>> Lowercase 'U' with umlaut appears to be Unicode U+00FC.
>
> and 8859-15 0xFC
>
> so it seems mysql is giving ISO 8859-15 (or possibly ISO 8859-1 or
> WIN-1252) encoding.
>
> Could it be that exim is not set to use unicode?
>


mysql documentation
"https://dev.mysql.com/doc/refman/5.6/en/charset-connection.html"

suggests that setting the enviroment variable LANG to (for example)
"de_DE.utf8" might cause utf8 to be used as the default by exim,
you'd have to either change your susyem locale. or add this to
the startup scripts. and set it explicitly when tesing using exim on
the command-line

perhaps this will work?

LANG=de_DE.utf8 exim -be '${lookup mysql{ SELECT CAST(CHAR(33,52,33) AS CHAR CHARACTER SET utf8); }}' | od -ta -tx1

it should print the following:

0000000   C   <  nl
         c3  bc  0a
0000003

    
or something like that.

> --
> This email has not been checked by half-arsed antivirus software
>



--
This email has not been checked by half-arsed antivirus software