Halász, not sure if I understood correcly, but you "mysql" console/client may have different charsets. This means you should set it accordingly. Check this out:

mysql> show global variables like '%character_set%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | latin1                     |
| character_set_connection | latin1                     |
| character_set_database   | latin1                     |
| character_set_filesystem | binary                     |
| character_set_results    | latin1                     |
| character_set_server     | latin1                     |
| character_set_system     | utf8                       |
+--------------------------+----------------------------+

Now compare results:

mysql> select convert(0xE29C94 using latin1), convert(0xE29C94 using utf8) \G
*************************** 1. row ***************************
convert(0xE29C94 using latin1): ✔
  convert(0xE29C94 using utf8): ?
1 row in set (0.00 sec)

mysql> set names utf8;
Query OK, 0 rows affected (0.00 sec)

mysql> select convert(0xE29C94 using latin1), convert(0xE29C94 using utf8) \G
*************************** 1. row ***************************
convert(0xE29C94 using latin1): ✔
  convert(0xE29C94 using utf8): ✔
1 row in set (0.00 sec)



The check mark shows first in the first SELECT, and second on the second SELECT. Not sure if you'll be able to see, it's best you try it yourself.


-NT

Em 28-03-2012 03:43, Halász Sándor escreveu:
2012/03/27 11:20 -0700, Todd Lyons>>>>
This seems backwards from what I expected:

mysql>  select convert(0xE29C94 using latin1), convert(0xE29C94 using utf8) \G
*************************** 1. row ***************************
convert(0xE29C94 using latin1): ✔
   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" ?
<<<<<<<<
Correct value? It does not look correct in this message--but maybe you are 
using a display that understands UTF8.

The output of
convert(0xE29C94 using latin1)
through the client is three bytes long, sent in order from high to low, and if your 
display does UTF8 the check will show, and the ASCII box drawing, which with 
"\G" is not used, will not line up. Try it after both
charset latin1
and
charset utf8
.




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql

Reply via email to