From: Todd Lyons Date: March 27 2012 6:20pm Subject: Re: big character constant List-Archive: http://lists.mysql.com/mysql/227059 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2012/3/27 Hal=C3=A1sz S=C3=A1ndor : >>>>> 2012/03/27 00:22 +0200, Walter Tross >>>> > it looks like it's as simple as this: > insert into mytable (mycolumn) values (0xE29C94), (0xE29C98) > In some contexts it might be necessary to force the character set like th= is, though: > convert(0xE29C94 using utf8) > <<<<<<<< > Yes! and with this I can use it for a constant in the middle of a query, = which I really want: > > IF(IFNULL(ReceivesFlyer, 1), CONVERT(X'E29C94' USING utf8), '') This seems backwards from what I expected: mysql> select convert(0xE29C94 using latin1), convert(0xE29C94 using utf8) = \G *************************** 1. row *************************** convert(0xE29C94 using latin1): =E2=9C=94 convert(0xE29C94 using utf8): ? 1 row in set (0.00 sec) I expected the second one to print the check mark and the first one to have the problem because there is no heavy check mark in latin1. What am I missing, why is it printing out the correct value "using latin1" but not "using utf8" ? ...Todd --=20 Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Martin Golding