<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>MySQL Forums - Character Sets, Collation, Unicode</title>
        <description>Forum for MySQL Character Sets, Collation, Unicode</description>
        <link>http://forums.mysql.com/list.php?103</link>
        <lastBuildDate>Mon, 20 May 2013 18:00:06 +0000</lastBuildDate>
        <generator>Phorum 5.2.19</generator>
        <item>
            <guid>http://forums.mysql.com/read.php?103,586149,586149#msg-586149</guid>
            <title>mysql can not to insert unicode16 uncommon word (5 replies)</title>
            <link>http://forums.mysql.com/read.php?103,586149,586149#msg-586149</link>
            <description><![CDATA[ connect with ODBC “DRIVER={MySQL ODBC 5.2w Driver};SERVER=%s;PORT=%d;DATABASE=%s;UID=%s;PASSWORD=%s;OPTION=3;” <br />
szSQL.Format(_T(&quot;INSERT INTO test&quot;) <br />
_T(&quot;(Name)&quot;) <br />
_T(&quot;VALUES('%s')&quot;), _T(&quot;𢈢&quot;)); <br />
m_Conn.pConn-&gt;Execute((_bstr_t)szSQL, &amp;RecordsAffected, adCmdText); <br />
<br />
<br />
The program does not return，This problem has troubled me for a long time，Who can help me answer this question thanks]]></description>
            <dc:creator>mzy ma</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Fri, 17 May 2013 03:02:36 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,583165,583165#msg-583165</guid>
            <title>mysql_query and embarcadero c++ (1 reply)</title>
            <link>http://forums.mysql.com/read.php?103,583165,583165#msg-583165</link>
            <description><![CDATA[ Hello,<br />
I use MySQL C API with Embacadero c++ without any problems.<br />
But when I try to send any wide character (UNICODE) like Arabic symbols, appears as not readable characters in MySQL database. because the SQL string that I send it by mysql_query function must be (const char *) and not (const wchar_t *).<br />
<br />
thanks for any helps.]]></description>
            <dc:creator>tawab zawiti</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Sat, 06 Apr 2013 17:53:21 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,582974,582974#msg-582974</guid>
            <title>Characters not getting stored (3 replies)</title>
            <link>http://forums.mysql.com/read.php?103,582974,582974#msg-582974</link>
            <description><![CDATA[ Hello, I have yet another problem with character sets. I have read lots of threads here and the very informative page at <a href="http://mysql.rjweb.org/doc.php/charcoll"  rel="nofollow">http://mysql.rjweb.org/doc.php/charcoll</a>, but I found no answer.<br />
<br />
Here is the issue: I'm designing a new database from scratch on MySQL version 5.5.27-log and I would like to use utf8 with collation utf8_unicode_ci throughout, because it will have to store names in German, Italian and English.<br />
<br />
I defined the database to use DEFAULT CHARACTER SET = utf8 COLLATE utf8_unicode_ci, I declared each table with DEFAULT CHARACTER SET = utf8 and I even repeated the same thing in most columns of the tables.<br />
<br />
The only two tables I double checked with SHOW CREATE TABLE tbl show everything as utf8 with collate utf8_unicode_ci. The others don't matter because I have the problem already with one of these.<br />
<br />
I tried different things and basically tried to store 'Forlì' and (just to mess with it) 'Förlìßen'.<br />
<br />
With the first one I get a warning &quot;Incorrect string value '\x8D' for column 'birthplace' at row 1&quot; and when I select it, it shows just 'Forl' without the final 'ì'. The second one too gets truncated at the first &quot;invalid&quot; character that it encounters: ö, with an &quot;Incorrect string value&quot; error message. That means it stores only 'F'.<br />
<br />
The test with 'birthplace', hex(brithplace), length(birthplace) and char_length(birthplace) shows the following:<br />
<br />
for 'Forlì': 'Forl', 466F726C, 4, 4.<br />
for Förlìßen: 'F', 46, 1, 1.<br />
<br />
All of this happens when I set the &quot;character_set_*&quot; variables to utf8 (other than the filesystem, which I didn't touch).<br />
<br />
With other combinations of &quot;character_set_*&quot; I do get different symbols on the screen and different hex numbers in the table, but I have not got the right one yet: if I set names to latin1 or cp850 (which appears to be the default in my installation, the initial set-up I get when starting the console is that) and leave character_set_database at utf8, then it does not truncate the strings at the first non-english character, but the results are only shown correct if I enter the data from console.<br />
<br />
I tried importing the data from a file, saved both as latin1 and as utf8, and it does store something, but not the right thing, regardles of the variables setting.<br />
<br />
I dropped the database and recreated it several times with different settings of the variables at the beginning, but I don't get it right.<br />
<br />
In all these situations I'm entering the letters from a german keyboard under Windows 7, if that can make any difference.<br />
<br />
I'm completely confused: it seems it only works if I enter the data from the keyboard, and this again if I don't set names to utf8 (which I thought would actually be the right thing to do). Also I would like to import them from a file because sometimes I don't have access to the server and it would be more convenient for me to prepare a file and then import it all at once.<br />
<br />
Any help would be appreciated.<br />
<br />
Thank you.]]></description>
            <dc:creator>Andrea Croci</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Sat, 06 Apr 2013 05:07:57 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,579219,579219#msg-579219</guid>
            <title>Is STR_TO_DATE function doesn't work with UCS2 charset? (4 replies)</title>
            <link>http://forums.mysql.com/read.php?103,579219,579219#msg-579219</link>
            <description><![CDATA[ Dear All,<br />
<br />
Pleaes help me with this quick query.<br />
<br />
[Server version: 5.5.29-log MySQL Community Server (GPL)]<br />
I am working with a table which is having default charset ucs2. One of the coloumn is varchar(64) contains datetime information.<br />
<br />
I need to convert that varchar column to datetime in order to do some business logic. I used STR_TO_DATE function, It didn't work.<br />
I got a NULL, with a warning code 1411 and message - Incorrect datetime value: '' for function str_to_date.<br />
<br />
I did a quick experiment, changed the column charset to latin1. It's working.<br />
<br />
My query is, does the function STR_TO_DATE is incompatible with ucs2 charset? <br />
Is there any documentation available which mention about this incompatibility with certian set of charsets?(I serched this entire week and didn't find one, help me if you find one)<br />
<br />
For some function like char_length() are mentioned as multi-byte safe. <br />
Therefore, do I need to consider, the functions which are not mentioned the same way are incompatible with multi-byte?<br />
<br />
Kindly help.]]></description>
            <dc:creator>Jagadish Talluri</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Fri, 22 Mar 2013 14:15:07 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,578244,578244#msg-578244</guid>
            <title>accented letters, display and search (1 reply)</title>
            <link>http://forums.mysql.com/read.php?103,578244,578244#msg-578244</link>
            <description><![CDATA[ Hi,<br />
as the title, I have trouble with these blessed accented letters.<br />
I know that the 'subject was covered billions of times, but just can not seem to solve.<br />
Mysql version 5.5.29 64bit.<br />
I have the following problem:<br />
I create a database starting with character encoding to utf8 with the command<br />
<br />
&quot;Crate the official database;&quot;<br />
<br />
I create a table (up to some versions ago), the column names I could put an accent not anymore (first issue), but this matters little, then run<br />
<br />
&quot;Create table customer (id int not null auto_increment, City varchar (255) not null, primary key (id));&quot;<br />
<br />
I'm going to create my table insert (from ms-dos prompt), created in the column, the character &quot;ò&quot; through<br />
<br />
&quot;Insert into customers (City) VALUES ('o');&quot;<br />
<br />
and here comes the first problem, the terminal answers me<br />
<br />
&quot;Mysql&gt; insert into customers (City) values ​​(&quot; ò &quot;);<br />
ERROR 1366 (HY000): Incorrect string value: '\ x95' for column 'City' at row 1<br />
mysql&gt; &quot;<br />
<br />
then I force the connection to the database with the command<br />
<br />
&quot;Set names latin1&quot;<br />
<br />
Rieseguo the 'insert, is magically takes me an accented letter.<br />
Now, to business needs, the database will be 'backupped' (pass the word) 1 time per day.<br />
Then running back, I like to check the correct data import, what 'now there is a need, then I get disconnected mysql, and run the command<br />
<br />
&quot;Mysqldump-u user-p official&gt; backup.sql&quot;<br />
<br />
OnRPG create a database to test the 'import<br />
<br />
&quot;I try create database;&quot;<br />
<br />
at this point the backup through reimporto<br />
<br />
&quot;Mysqldump-u user-p I try &lt;backup.sql&quot;<br />
<br />
Result I find a table with columns 'id and Citta' but completely empty.<br />
<br />
I tried one of the many attempts, forcing the 'exports in latin1, in that case I inserted the data into the database, but when executing an<br />
<br />
&quot;Select * from clients where City LIKE '%ò%';&quot;<br />
<br />
Comes back to me empty, but if I try '%o%', I found the field. But ò stressed, had a strange character, but by the carattare phpmyadmin I saw him right!<br />
Does anyone know how to solve this problem permanently boring?<br />
<br />
Thanks for any replies<br />
<br />
Alessandro]]></description>
            <dc:creator>Alessandro Abiusi</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Fri, 01 Feb 2013 07:12:59 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,578075,578075#msg-578075</guid>
            <title>Special Characters (äöüß), switching to UTF8, collation-problems (1 reply)</title>
            <link>http://forums.mysql.com/read.php?103,578075,578075#msg-578075</link>
            <description><![CDATA[ Hi all,<br />
<br />
we have a larger DBMS (not an oracle-product) that is able to export data into a mySQL system. Or more precisely we are currently at a stage where the mySQL export is about to turn productive.<br />
With more test-data available, we are encountering more problems. One of the larger problems we've run into recently was the handling of special characters, namely german &quot;umlauts&quot;, which are äöü and ß. Others might be of importance and not yet discovered.<br />
It turned out that somewhere between out application and mySQL server, the statement was converted into UTF8 (supposedly dbx-driver-component), and we haven't been able to change this despite trying a myriad of different settings as well programmatically (e.g.    Connection.SetParameter(&quot;CharSet&quot;, &quot;...&quot;); )<br />
as in mySQL table-wise or DB-wise (alter table/db, set charset= collate=).<br />
<br />
So we finally resorted to converting all db-tables to UTF8. The transfer of special-characters now works. However all collations for UTF8 are not case-sensitive except for the bin-collation. The bin-collation however is not usable, since we need to sort data using &quot;ORDER BY&quot; in our selects instead of internal sorting algorithms local to our applications.<br />
However, our source-DBMS is case-sensitive and we do have unique indices on many of our varchar-columns, which do not translate into this mySQL-configuration.<br />
<br />
Finally, the question is: how can we handle case-sensitive mySQL with special characters as äöüß ?<br />
<br />
Thanks a lot for any input!<br />
Regards,<br />
P.]]></description>
            <dc:creator>C.A. Pelle</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Thu, 31 Jan 2013 15:02:00 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,577109,577109#msg-577109</guid>
            <title>Use of [] square-brackets to enclose table/column names (1 reply)</title>
            <link>http://forums.mysql.com/read.php?103,577109,577109#msg-577109</link>
            <description><![CDATA[ I am trying to connect into a MySQL schema via an existing application.  That application allows you to specify a connection string which I was able to implment ... the connection now works.<br />
<br />
Unfortunately, the application includes the use of [] (square brackets) to enclose table and column names when interacting with the MySQL tables ... it's hard-coded into the application so, I can't change that.<br />
<br />
As you know, MySQL can be configured to use `, &quot; or '.<br />
<br />
Does anyone know of a MySQL configuration parameter that would allow me to specify that this MySQL schema should use [] instead?  In all the reading I've done so far, I fear the answer is no.<br />
<br />
Thank you for anything you can offer.<br />
<br />
Doug]]></description>
            <dc:creator>Doug Johnston</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Sat, 12 Jan 2013 19:11:36 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,575847,575847#msg-575847</guid>
            <title>can I use latin1 and utf8 at the same time? (2 replies)</title>
            <link>http://forums.mysql.com/read.php?103,575847,575847#msg-575847</link>
            <description><![CDATA[ hi <br />
Currenty I've got latin1, but I'd like to set utf8 as default charset for all levels (server,db,table,session,client).<br />
Please, let me know if having set this in my.ini in client and server sections (of course it applies only for new databases and tables) I can still use my old databases and tables in latin1 fashion.<br />
Or, will it collide when quering the data. Then should I unify? <br />
As for backuping, I'm performing offline backups (not mysqldump), so restoring shouldn't be an issue.<br />
I wouldn't like to do it as I have a TB db and the convertion will be troublesome.<br />
<br />
it seems like each schema is independent, having own db.opt setting's file.<br />
<br />
so now the only thing I try to figure out id what the application/client should be aware of. <br />
<br />
Can you see here any risks to jumble the database?]]></description>
            <dc:creator>Greg K.</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Thu, 10 Jan 2013 07:48:30 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,569102,569102#msg-569102</guid>
            <title>utf8_general_mysql500_ci performance (1 reply)</title>
            <link>http://forums.mysql.com/read.php?103,569102,569102#msg-569102</link>
            <description><![CDATA[ Hi,<br />
<br />
I've been looking but haven't found any performance comparison between utf8_general_mysql500_ci and utf8_general_ci in terms of performance. <br />
<br />
I know utf8_general_mysql500_ci is supposed to behave the same as utf8_general_ci pre v5.1.24 in terms of ordering but what about performance? will it be the same?<br />
<br />
Thanks.<br />
- Jose -]]></description>
            <dc:creator>Jose Angel</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Fri, 21 Sep 2012 04:55:52 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,566176,566176#msg-566176</guid>
            <title>Default collation used in STRCMP() function (4 replies)</title>
            <link>http://forums.mysql.com/read.php?103,566176,566176#msg-566176</link>
            <description><![CDATA[ Hello,<br />
What is the default collation used in a STRCMP() function if no collation is specified?<br />
(I know that we can explicitly specify a collation for comparing the 2 strings in STRCMP()).<br />
<br />
From where does MySQL gets this value - collation_database, collation_server, collation of the table?<br />
<br />
<br />
Regards,<br />
Sachin Vyas.]]></description>
            <dc:creator>Sachin Vyas</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Tue, 28 Aug 2012 04:18:01 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,563402,563402#msg-563402</guid>
            <title>Problem setting the &quot;default-character-set&quot; parameter in my.ini file. (7 replies)</title>
            <link>http://forums.mysql.com/read.php?103,563402,563402#msg-563402</link>
            <description><![CDATA[ Hello,<br />
I am trying to change the value for the variable &quot;default-character-set&quot; to latin1 as below in the &quot;my.ini&quot; file:<br />
<br />
before change<br />
===============<br />
<br />
mysql&gt; show variables like 'character%';<br />
+--------------------------+---------------------------------------------------------+<br />
| Variable_name            | Value                                                   |<br />
+--------------------------+---------------------------------------------------------+<br />
| character_set_client     | utf8                                                    |<br />
| character_set_connection | utf8                                                    |<br />
| character_set_database   | utf8                                                    |<br />
| character_set_filesystem | binary                                                  |<br />
| character_set_results    | utf8                                                    |<br />
| character_set_server     | utf8                                                    |<br />
| character_set_system     | utf8                                                    |<br />
| character_sets_dir       | C:\Program Files\MySQL\MySQL Server 5.5\share\charsets\ |<br />
+--------------------------+---------------------------------------------------------+<br />
8 rows in set (0.00 sec)<br />
<br />
Now, I made the following change o &quot;my.ini&quot; file:<br />
<br />
[mysql]<br />
default-character-set=latin1<br />
<br />
Now, after making the above change, when I save the file &amp; reconnect as &quot;root&quot; user &amp; execute the command &quot;show variables like 'character%';&quot; I get the following output:<br />
(I even tried restarting the mysql service after making the changes to the &quot;my.ini&quot; file, but did not get the expected results.)<br />
<br />
mysql&gt; show variables like 'character%';<br />
+--------------------------+---------------------------------------------------------+<br />
| Variable_name            | Value                                                   |<br />
+--------------------------+---------------------------------------------------------+<br />
| character_set_client     | utf8                                                    |<br />
| character_set_connection | utf8                                                    |<br />
| character_set_database   | utf8                                                    |<br />
| character_set_filesystem | binary                                                  |<br />
| character_set_results    | utf8                                                    |<br />
| character_set_server     | utf8                                                    |<br />
| character_set_system     | utf8                                                    |<br />
| character_sets_dir       | C:\Program Files\MySQL\MySQL Server 5.5\share\charsets\ |<br />
+--------------------------+---------------------------------------------------------+<br />
8 rows in set (0.00 sec)<br />
<br />
Query<br />
=====<br />
Shouldn't the values for :<br />
1) character_set_client<br />
2) character_set_connection<br />
3) character_set_server<br />
be = latin1.<br />
<br />
When I try doing the same change from command line using the command, it works as expected :<br />
<br />
mysql -u root -pmanager --default-character-set=latin1<br />
<br />
Now, I exceute the following at mysql prompt:<br />
<br />
mysql&gt; show variables like 'character%';<br />
+--------------------------+---------------------------------------------------------+<br />
| Variable_name            | Value                                                   |<br />
+--------------------------+---------------------------------------------------------+<br />
| character_set_client     | latin1                                                  |<br />
| character_set_connection | latin1                                                  |<br />
| character_set_database   | utf8                                                    |<br />
| character_set_filesystem | binary                                                  |<br />
| character_set_results    | latin1                                                  |<br />
| character_set_server     | utf8                                                    |<br />
| character_set_system     | utf8                                                    |<br />
| character_sets_dir       | C:\Program Files\MySQL\MySQL Server 5.5\share\charsets\ |<br />
+--------------------------+---------------------------------------------------------+<br />
8 rows in set (0.00 sec)<br />
<br />
As per MySQL documentation <a href="http://dev.mysql.com/doc/refman/5.5/en/server-options.html#option_mysqld_default-character-set"  rel="nofollow">http://dev.mysql.com/doc/refman/5.5/en/server-options.html#option_mysqld_default-character-set</a><br />
I changed the variable name to character-set-server, but that did n't help either.<br />
<br />
But, If the above link is true then how did it work for the command:<br />
	mysql -u root -pmanager --default-character-set=latin1<br />
since --default-character-set is deprecated from MySQl 5.5.3 ?]]></description>
            <dc:creator>Sachin Vyas</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Fri, 03 Aug 2012 10:46:21 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,563363,563363#msg-563363</guid>
            <title>How to support full Unicode in MySQL databases (no replies)</title>
            <link>http://forums.mysql.com/read.php?103,563363,563363#msg-563363</link>
            <description><![CDATA[ How to support full Unicode in MySQL databases<br />
<a href="http://mathiasbynens.be/notes/mysql-utf8mb4"  rel="nofollow">http://mathiasbynens.be/notes/mysql-utf8mb4</a>]]></description>
            <dc:creator>Edwin Desouza</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Mon, 30 Jul 2012 16:52:48 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,563027,563027#msg-563027</guid>
            <title>'þ' Will shows '?' in table when I read it from text file (1 reply)</title>
            <link>http://forums.mysql.com/read.php?103,563027,563027#msg-563027</link>
            <description><![CDATA[ Hello,<br />
<br />
I am facing problem with using 'þ' character.<br />
I am reading this character from  text file which was generated using &quot;INTO OUTFILE...&quot; now I am trying to insert data from this text file to database table using &quot;LOAD DATA INFILE&quot; After performing this steps In my database table data is not written properly it shows '?' everywhere where 'þ' is.<br />
<br />
Can you give me tips what is wrong here ..............  <br />
<br />
Below is the my current settings for mysql variables<br />
=====================================<br />
'character_set_client', 'utf8'<br />
'character_set_connection', 'utf8'<br />
'character_set_database', 'latin1'<br />
'character_set_filesystem', 'binary'<br />
'character_set_results', 'utf8'<br />
'character_set_server', 'latin1'<br />
'character_set_system', 'utf8'<br />
<br />
<br />
'collation_connection', 'utf8_general_ci'<br />
'collation_database', 'latin1_bin'<br />
'collation_server', 'latin1_bin'<br />
=====================================<br />
<br />
Thanks<br />
Chintan Patel]]></description>
            <dc:creator>Chintan Patel</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Tue, 31 Jul 2012 02:01:16 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,562172,562172#msg-562172</guid>
            <title>Reading text from a BLOB field (2 replies)</title>
            <link>http://forums.mysql.com/read.php?103,562172,562172#msg-562172</link>
            <description><![CDATA[ I was having trouble with question marks being displayed in the text read back from a blob field in MySql. I found a partial solution when I read this conversation:   <a href="http://stackoverflow.com/questions/948174/how-do-i-convert-from-blob-to-text-in-mysql"  rel="nofollow">http://stackoverflow.com/questions/948174/how-do-i-convert-from-blob-to-text-in-mysql</a>  Converting to utf8 (aka UTF-8) solved part of the problem but my text truncated when it ran into a special character (the em or long dash). The CONVERT() function is still the answer, but I had to figure out which character set our database was using. Below are the steps I followed to figure this out. I'm new to MySQL, so there are probably better ways to get at this information. <br />
	1. SHOW FULL COLUMNS FROM mytable IN mydatabase;   -- note the collation on the text fields;<br />
	2. SHOW CHARACTER SET;  -- find the collation you saw in step one in either the Description or Default collation columns. Copy the value from the Charset column. <br />
	3. In your SQL SELECT statement add a field like this: CONVERT(someBlobTextField, USING copiedCharsetValue)   <br />
	4. Run your query and review your data. Viola! It works.  <br />
	<br />
	I also ran across a PHP function called nl2br() that adds the line breaks the user had entered back in.]]></description>
            <dc:creator>Margaret Nelson</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Tue, 31 Jul 2012 20:35:47 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,561321,561321#msg-561321</guid>
            <title>sort / search / display - columns (1 reply)</title>
            <link>http://forums.mysql.com/read.php?103,561321,561321#msg-561321</link>
            <description><![CDATA[ Hello guys,<br />
<br />
We have a problem with collations and sorting behavior of mysql.<br />
<br />
We have in a table &quot;names&quot; names like this:<br />
Müller, Měyer, Śebastian, Ałan, ..<br />
<br />
Now we want find the row &quot;Müller&quot; when we search after Mueller, Müller (not on Muller)<br />
We want find the row &quot;Měyer&quot; when we search after Měyer, Meyer<br />
We want find the row &quot;Ałan&quot; when we search after Ałan, Alan<br />
<br />
So ä = ae and ě = e and ł = l.... (also on sorting it must be the same)<br />
<br />
We also needs &quot;no sorting  words&quot;. <br />
<br />
For example, we put on the name &quot;Wolfgang Johann {von}&quot;<br />
{-signs to say the system that it is a non sorting word.<br />
<br />
Our solution:<br />
we have 3 columns with the same name. &quot;name, name_sort, name,search&quot;.<br />
name_search is used for boolean fulltext search. (on save we change ü/ä/ö/ě/ł.. to ue/ae/oe/e/l..), name_sort is used for sorting (we do the same + remove the words in {}-signs), name is only the display column(we romve the {- signs on output)<br />
<br />
is there a way to do this without having this 3 colums ?<br />
this (and other tables, like titles) have many rows, so we cant transform before a query.]]></description>
            <dc:creator>Dominik Meyer</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Tue, 17 Jul 2012 05:02:40 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,557812,557812#msg-557812</guid>
            <title>saving 'url_encode' with no modifications (1 reply)</title>
            <link>http://forums.mysql.com/read.php?103,557812,557812#msg-557812</link>
            <description><![CDATA[ hi, i am using php with mysql, and for security reasons, i save all strings as 'urlencode', wich among other things, converts quotes, double quotes (which are string end chars) and basically all that is not a letter or a number into url encode, or a '%' followed by a number. i expect it to save messages written in spanish, so chars like á, ñ, é and others, are parsed by the url encode. there are some scape functions included in php to make a string 'database safe', which works more or less the same (escape end of string chars and other stuff), but most of my code has urlencodes everywhere (so if your answer is 'use those functions, please dont'). when i store the string, urlencoded into the databse, and then retrieve it, i dont find the same symbols i stored, for example, if i store an 'ñ', what i get after i save it and then read it, is a sequence of werid chars, for example, in 'españa', what i get is espaÃ±a. for a previos project i made a replace function, but i find it like cutting corners, so how do i store my &amp;## and retrieve the same %## i save? somebody told me i should check the definition of the table, what definition should i use? (i use the default engines when declaring tables, since i do not specify a particular engine)<br />
tnx]]></description>
            <dc:creator>Jairo Supelano</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Mon, 18 Jun 2012 01:27:03 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,557446,557446#msg-557446</guid>
            <title>WHERE without COLLATE does not work (1 reply)</title>
            <link>http://forums.mysql.com/read.php?103,557446,557446#msg-557446</link>
            <description><![CDATA[ I have a SELECT ... WHERE problem when not using COLLATE.<br />
<br />
mysql&gt; SET NAMES 'utf8';<br />
Query OK, 0 rows affected (0.00 sec)<br />
<br />
mysql&gt; SET ONE_SHOT collation_connection = utf8_unicode_ci;<br />
Query OK, 0 rows affected (0.00 sec)<br />
<br />
mysql&gt; SELECT sysname FROM tbl_system WHERE sysname LIKE '%mysql%';<br />
Empty set (0.01 sec)<br />
<br />
mysql&gt; SELECT sysname FROM tbl_system WHERE sysname LIKE '%mysql%' COLLATE utf8_unicode_ci;<br />
+-------------------------+<br />
| sysname                 |<br />
+-------------------------+<br />
| mysqldata01.domain.tld  | <br />
| mysqldata02.domain.tld  | <br />
| mysqlsrv01.domain.tld   | <br />
| mysqlsrv02.domain.tld   | <br />
| mysqlsrv03.domain.tld   | <br />
| mysqldata03.domain.tld  | <br />
+-------------------------+<br />
6 rows in set (0.02 sec)<br />
<br />
The server variables are set to utf8:<br />
mysql&gt; SHOW VARIABLES LIKE '%char%';<br />
+--------------------------+----------------------------+<br />
| Variable_name            | Value                      |<br />
+--------------------------+----------------------------+<br />
| character_set_client     | utf8                       | <br />
| character_set_connection | utf8                       | <br />
| character_set_database   | utf8                       | <br />
| character_set_filesystem | binary                     | <br />
| character_set_results    | utf8                       | <br />
| character_set_server     | utf8                       | <br />
| character_set_system     | utf8                       | <br />
| character_sets_dir       | /usr/share/mysql/charsets/ | <br />
+--------------------------+----------------------------+<br />
8 rows in set (0.00 sec)<br />
<br />
mysql&gt; SHOW VARIABLES LIKE '%coll%';<br />
+----------------------+-----------------+<br />
| Variable_name        | Value           |<br />
+----------------------+-----------------+<br />
| collation_connection | utf8_unicode_ci | <br />
| collation_database   | utf8_unicode_ci | <br />
| collation_server     | utf8_unicode_ci | <br />
+----------------------+-----------------+<br />
3 rows in set (0.00 sec)<br />
<br />
Also the db/table/colums are utf8:<br />
mysql&gt; SHOW TABLE STATUS WHERE Name = 'tbl_system';<br />
+------------+------------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-----------------+----------+----------------+---------+<br />
| Name       | Engine     | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation       | Checksum | Create_options | Comment |<br />
+------------+------------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-----------------+----------+----------------+---------+<br />
| tbl_system | ndbcluster |      10 | Dynamic    | 1766 |             60 |      360448 |               0 |            0 |         0 |           1767 | NULL        | NULL        | NULL       | utf8_unicode_ci |     NULL |                |         | <br />
+------------+------------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-----------------+----------+----------------+---------+<br />
1 row in set (0.01 sec)<br />
<br />
mysql&gt; SHOW FULL COLUMNS FROM tbl_system WHERE Field='sysname';<br />
+---------+--------------+-----------------+------+-----+---------+-------+----------------------+---------+<br />
| Field   | Type         | Collation       | Null | Key | Default | Extra | Privileges           | Comment |<br />
+---------+--------------+-----------------+------+-----+---------+-------+----------------------+---------+<br />
| sysname | varchar(255) | utf8_unicode_ci | NO   | MUL | NULL    |       | select,insert,update |         | <br />
+---------+--------------+-----------------+------+-----+---------+-------+----------------------+---------+<br />
1 row in set (0.01 sec)<br />
<br />
Can I check something more, or is it not possible to use a SELECT without COLLATE in this case? The database runs on a mysql cluster:<br />
<br />
mysql&gt; SHOW VARIABLES LIKE '%version%';<br />
+-------------------------+-----------------------------------+<br />
| Variable_name           | Value                             |<br />
+-------------------------+-----------------------------------+<br />
| ndbinfo_version         | 459027                            | <br />
| protocol_version        | 10                                | <br />
| slave_type_conversions  |                                   | <br />
| version                 | 5.1.56-ndb-7.1.19-cluster-gpl-log | <br />
| version_comment         | MySQL Cluster Server (GPL)        | <br />
| version_compile_machine | x86_64                            | <br />
| version_compile_os      | unknown-linux-gnu                 | <br />
+-------------------------+-----------------------------------+<br />
7 rows in set (0.00 sec)]]></description>
            <dc:creator>Martin W</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Wed, 27 Jun 2012 09:13:45 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,525036,525036#msg-525036</guid>
            <title>UTF-8 vs UCS-2 (especially on ndb) (no replies)</title>
            <link>http://forums.mysql.com/read.php?103,525036,525036#msg-525036</link>
            <description><![CDATA[ I'm in the process of migrating a InnoDB database to ndb, and we're frequently running into the 14000-byte row size limit imposed by ndb. There are quite a number of VARCHAR columns in our DB, and we're using the utf8 character set.<br />
My question is: what (if any) is the benefit of using UTF-8 over UCS-2?<br />
Since VARCHAR needs to allocate memory for the worst-case scenario (i.e., the maximum length) VARCHARs in UTF-8 require 3 times the length, whereas UCS-2 only requires 2 times the length. UTF-8 is optimized for scenarios with mainly one- and two-byte characters, but if the storage mechanism has to assume three bytes anyway, UCS-2 seems to be the better choice.<br />
Am I overlooking something here? It seems like using UTF-8 for VARCHARs is a waste of space (especially problematic for MySQL Cluster with the smaller row memory limit of 14000 bytes).<br />
Any insights?]]></description>
            <dc:creator>Mirko Raner</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Wed, 11 Apr 2012 00:53:29 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,524905,524905#msg-524905</guid>
            <title>Latin1 character set driving me mad! (2 replies)</title>
            <link>http://forums.mysql.com/read.php?103,524905,524905#msg-524905</link>
            <description><![CDATA[ I have a database that I am moving between webhosts.  On the prior webhost, this SQL code worked perfectly:<br />
<br />
SELECT addresses.address AS address, storedbits.bits AS bits, addresses.id AS id <br />
FROM addresses LEFT JOIN storedbits ON storedbits.addressesid = addresses.id <br />
WHERE address='$address' COLLATE utf8_bin AND block != -1 AND block &lt; $lastconf ORDER BY block, addresses.id, storedbits.bits LIMIT 1<br />
<br />
But, after dumping the table as a .sql, and importing it into the new webhost, I get the following error:<br />
<br />
Error in query: SELECT addresses.address AS address, storedbits.bits AS bits, addresses.id AS id FROM addresses LEFT JOIN storedbits ON storedbits.addressesid = addresses.id WHERE address='blahblahblah' COLLATE utf8_bin AND block != -1 AND block &lt; 173962 ORDER BY block, addresses.id, storedbits.bits LIMIT 1. COLLATION 'utf8_bin' is not valid for CHARACTER SET 'latin1'<br />
<br />
Ok, fine.  So I check my tables.  They are set to utf8 - default collation.  I check my database.  It is set to utf8 - default collation.  I check my rows.  They are set to utf8 - utf8_bin.<br />
<br />
If I remove the COLLATE statement, and instead, use BINARY just before the address comparison, then it works - the query runs fine.  But it isn't fast enough.  It takes 3-4 times as long to run the query as it does using collation on the old host.  I don't know if I can attribute this speed difference entirely to query differences, as the hosts could very well have different speed of CPUs available, but I certainly want to be sure I am doing everything I can to make the queries run quickly and efficiently as possible.<br />
<br />
So, where are the latin1 characters, if none of my database is set up with them?  Why am I getting this error on the new host, but not the old one with the same query?<br />
<br />
EDIT:  Also, I tried the guide located here:  <a href="http://docs.moodle.org/22/en/Converting_your_MySQL_database_to_UTF8"  rel="nofollow">http://docs.moodle.org/22/en/Converting_your_MySQL_database_to_UTF8</a><br />
<br />
I did these steps:<br />
mysqldump -uusername -ppassword -c -e --default-character-set=utf8 --single-transaction --skip-set-charset --add-drop-database -B dbname &gt; dump.sql<br />
cp dump.sql dump-fixed.sql<br />
vim dump-fixed.sql<br />
:%s/DEFAULT CHARACTER SET latin1/DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci/<br />
:%s/DEFAULT CHARSET=latin1/DEFAULT CHARSET=utf8/<br />
:wq<br />
mysql -uusername -ppassword &lt; dump-fixed.sql<br />
<br />
The two find/replace commands in VIM didn't find anything, but I re-imported the dump-fixed.sql anyway.  Still comes up with the latin1 problem.  I don't understand where/why these latin1 characters are coming from!]]></description>
            <dc:creator>Justin P</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Sat, 14 Apr 2012 06:33:58 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,524225,524225#msg-524225</guid>
            <title>UpperCase -&gt; Lowercase (1 reply)</title>
            <link>http://forums.mysql.com/read.php?103,524225,524225#msg-524225</link>
            <description><![CDATA[ After executing these statements:<br />
<br />
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;<br />
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;<br />
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';<br />
<br />
CREATE SCHEMA IF NOT EXISTS `Salma_WTF` DEFAULT CHARACTER SET latin2  COLLATE latin2_general_ci ;<br />
USE `Salma_WTF` ;<br />
<br />
-- -----------------------------------------------------<br />
-- Table `Salma_WTF`.`stCountries`atclubfeesatclublocationsatclublocations<br />
-- -----------------------------------------------------<br />
CREATE  TABLE IF NOT EXISTS `Salma_WTF`.`stCountries` (<br />
  `fid` INT NOT NULL AUTO_INCREMENT ,<br />
  `fISO3` CHAR(3) NULL ,<br />
  `fName` VARCHAR(45) NULL ,<br />
  PRIMARY KEY (`fid`) )<br />
ENGINE = InnoDB;<br />
<br />
<br />
why are then the fieldnames as defined, but the tablename is in lowercase ?<br />
<br />
kr/Werner]]></description>
            <dc:creator>Werner Broser</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Sat, 07 Apr 2012 16:44:44 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,522416,522416#msg-522416</guid>
            <title>File .SQL set collation LATIN1 to UTF8. (1 reply)</title>
            <link>http://forums.mysql.com/read.php?103,522416,522416#msg-522416</link>
            <description><![CDATA[ Hello everyone;<br />
<br />
I´m using MYSQL-Server 5.5.20 running on Centos; I have develop a script to make backup of my databases but when the SQL file is done and I try to import again I get that the collation is set to latin1 instead of UTF8.<br />
<br />
This is the command that I´m using:<br />
 mysqldump --skip-set-charset --default-character-set=UTF8 db_masterdb &gt; db-test1-dump.sql<br />
<br />
Do you have any idea to help me?<br />
<br />
TIA....]]></description>
            <dc:creator>Andrews Dumith</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Sun, 01 Apr 2012 07:10:46 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,514511,514511#msg-514511</guid>
            <title>replication from 4.1 to 5.5 and character set change (3 replies)</title>
            <link>http://forums.mysql.com/read.php?103,514511,514511#msg-514511</link>
            <description><![CDATA[ Hello everyone,<br />
in our society we want to migrate our mysql db from an obsolete version 4.1 to a slightly newer version (5.5)<br />
<br />
Obviously replication between these two versions is not feasible.<br />
For this we will use the bridge (with engine blackhole)<br />
<br />
So the process will be:<br />
4.1 (iso) -&gt; 5.0 (iso) -&gt; 5.1 (utf8) -&gt; 5.5 (utf8).<br />
My question is:<br />
I exclude the ustanza 5.1?<br />
So, I can replicate the 5.5 (utf8) from 5.0 (iso)?<br />
Do you know if there are any contraindications?<br />
We have also some tables with a blob field, stored in latin. How can i replicate the data having the blob content converted into utf8?<br />
<br />
Thanks to all<br />
Gaspare]]></description>
            <dc:creator>Gaspare Siclari</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Sat, 18 Feb 2012 04:15:18 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,511296,511296#msg-511296</guid>
            <title>storing hungarian characters (1 reply)</title>
            <link>http://forums.mysql.com/read.php?103,511296,511296#msg-511296</link>
            <description><![CDATA[ Hi there, I need to store special hungarian accuted characters and no mater how I tried to change the charsets and collation in mysql it inserts/diplays a '?' for some of the characters.<br />
Any help would be much appreciated.]]></description>
            <dc:creator>akos fortagh</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Mon, 23 Jan 2012 06:50:46 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,508741,508741#msg-508741</guid>
            <title>Storing &amp; Displaying Chinese characters [at the same time] (1 reply)</title>
            <link>http://forums.mysql.com/read.php?103,508741,508741#msg-508741</link>
            <description><![CDATA[ Hi, <br />
<br />
I'm a newbie in this issue. <br />
<br />
I have a form on a web. The web is coded with UTF8 and it has different languages. <br />
<br />
I've been able to write with Chinese characters with this form and display this characters afterwards from the database. So the problem is not displaying this characters in my website. <br />
<br />
My problem, or what I would like to do is, that when I check the data directly with MySqlAdmin client, Chinese symbols aren't there. They are coded in hexadecimal (I guess). This field in my database is coded in UTF8. (I tried with utf8_general_ci and utf8_unicode_ci and other utf8 and the result is the same) <br />
<br />
If I change in mysqladmin the collate character to gb2312 or gb2312_chinese_ci, and then I edit the field and I write chinese characters in it, I can modify the field and I can store it with the chinese charecters. But then, the website doesn't display correctly the chinese field. <br />
<br />
I would like to be able to show the chinese characters in the website and store chinese characters in the database at the same time (is it possible??) because I want to export this database afterwards. <br />
<br />
I'm using a MySql5.5 + PHP <br />
<br />
Thank you so much for your help.]]></description>
            <dc:creator>Gregori M</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Sat, 14 Jan 2012 21:52:24 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,506164,506164#msg-506164</guid>
            <title>change calendar type (2 replies)</title>
            <link>http://forums.mysql.com/read.php?103,506164,506164#msg-506164</link>
            <description><![CDATA[ Hi everybody,<br />
<br />
 I want to create a database to store data other than English language, in Persian language, and in Persian(farsi) language we have a different calendar by the name of Shamsi Calendar(persian calendar). Now my question is that how can i change the default Gregorian date to Shamsi date in mysql to store Persian dates.<br />
<br />
note: <br />
2011/12/19 = 1390/9/28<br />
<br />
Your help and reply will be my pleasure, i appreciate it.<br />
Kind Regards.]]></description>
            <dc:creator>zabltn khan</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Tue, 03 Jan 2012 11:17:36 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,503509,503509#msg-503509</guid>
            <title>Question about Double Encoding (1 reply)</title>
            <link>http://forums.mysql.com/read.php?103,503509,503509#msg-503509</link>
            <description><![CDATA[ Hi, all.  I was lucky to find Rick James' post on double encoding.  I believe that is the exact problem I'm having.  My tables are in UTF8, but the relevant system variables are all in latin1.  I'm getting the same symptoms described.  I do have two questions, though.<br />
<br />
First, I don't full understand how the characters are being translated from latin1 to utf8.  Specifically, how:<br />
<br />
    ⚈  latin1 E1 = utf8 C3A1 <br />
    ⚈  latin1 83 = utf8 C692 <br />
    ⚈  latin1 A1 = utf8 C2A1 <br />
<br />
The first and last ones are correct (a with accent and inverted exclamation, respectively).  In UTF8, c6 92 is a &quot;small f with hook&quot; while in latin, 83 is a capital S.  <br />
<br />
Second, in diagnosing this problem, when we looked at the selected columns through the MySQL command line client, the characters actually looked correct.  When we set set names utf8, it then appeared garbled.  How was the client able to correctly interpret it?<br />
<br />
Thanks for any insight.]]></description>
            <dc:creator>Shu Chow</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Thu, 01 Dec 2011 02:24:55 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,499456,499456#msg-499456</guid>
            <title>charset problem (3 replies)</title>
            <link>http://forums.mysql.com/read.php?103,499456,499456#msg-499456</link>
            <description><![CDATA[ Hello Everybody,<br />
<br />
I have a table named 'words' and it contains words. /id long, word char(50)/<br />
<br />
I executed a select statement, for search word. The statement doesn't differentiate between two words 'cipó' and 'cipö' <br />
<br />
select * from words where word = 'cipö'<br />
The query found the word 'cipó' too. Why?<br />
<br />
The charset is utf8 and the collation is utf8_generail_ci.<br />
<br />
I tried with this <br />
<br />
select * from words where BINARY word = 'cipö'<br />
It works perfectly. But, the HIBERNATE what I use doesn't know this syntax.<br />
<br />
<br />
Thanks]]></description>
            <dc:creator>László Köváry</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Fri, 25 Nov 2011 04:06:28 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,495913,495913#msg-495913</guid>
            <title>MATCH AGAINST (1 reply)</title>
            <link>http://forums.mysql.com/read.php?103,495913,495913#msg-495913</link>
            <description><![CDATA[ Hi.<br />
<br />
Could it be, how can I work for the search StopWords <br />
Match(name) AGAINST('+it +service' IN BOOLEAN MODE)]]></description>
            <dc:creator>kuno vaik</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Wed, 09 Nov 2011 10:02:47 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,490879,490879#msg-490879</guid>
            <title>Illegal mix of collation during replication (3 replies)</title>
            <link>http://forums.mysql.com/read.php?103,490879,490879#msg-490879</link>
            <description><![CDATA[ Occasionally, I get this error message in the mysql error log: &quot;Error 'Illegal mix of collations (utf8_general_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation '='' on query.&quot; during replication. The master is a &quot;5.0.91-log MySQL Community Server&quot;, and the slave is &quot;5.5.14-log MySQL Community Server&quot;.  &quot;utf8&quot; is not configured anywhere in the my.cnf file.  If I execute the statement manually on the slave, it still fails with the same error message.  If I issue &quot;SET character_set_connection=latin1;&quot;, I can continue replication by executing the statement manually, skip the statement in the replication, and start slave again.<br />
<br />
I'm not sure if this is a bug, or I have something misconfigured.  Any help is greatly appreciated.<br />
<br />
Failed Query:<br />
UPDATE A, B SET A.colA1 = B.B_PRIMARY_ID WHERE A.colA1='value' AND (INET_NTOA(A.IPADDR) = B.IPADDR) or A.IPADDR = B.IPADDR);<br />
<br />
SHOW CREATE TABLE A:<br />
<br />
CREATE TABLE A (<br />
  `colA1` int(10),<br />
  `IPADDR` varchar(128) NOT NULL DEFAULT '',<br />
<br />
) ENGINE=InnoDB DEFAULT CHARSET=latin1;<br />
<br />
SHOW FULL COLUMNS FROM A:<br />
+------------------+---------------------+-------------------+------+-----+---------+----------------+---------------------------------+--------+<br />
| Field            | Type                | Collation         | Null | Key | Default | Extra          | Privileges                      |Comment |<br />
+-------------------+--------------------+-------------------+------+-----+---------+----------------+---------------------------------+--------+<br />
| colA1            | int(10) unsigned    | NULL              | NO   | PRI | 0       |                | select,insert,update,references |        |<br />
| IPADDR           | varchar(128)        | latin1_swedish_ci | NO   |     |         |                | select,insert,update,references |        |<br />
+------------------+---------------------+-------------------+------+-----+---------+----------------+---------------------------------+--------+<br />
<br />
SHOW CREATE TABLE B:<br />
<br />
CREATE TABLE B (<br />
  `B_PRIMARY_ID` int(10),<br />
  `IPADDR` varchar(15) NOT NULL DEFAULT '',<br />
  PRIMARY KEY (`B_PRIMARY_ID`)<br />
) ENGINE=InnoDB AUTO_INCREMENT=XXX DEFAULT CHARSET=latin1;<br />
<br />
SHOW FULL COLUMNS FROM B:<br />
+------------------+---------------------+-------------------+------+-----+---------+----------------+---------------------------------+---------+<br />
| Field            | Type                | Collation         | Null | Key | Default | Extra          | Privileges                      | Comment |<br />
+------------------+---------------------+-------------------+------+-----+---------+----------------+---------------------------------+---------+<br />
| B_PRIMARY_ID     | int(10) unsigned    | NULL              | NO   | PRI | NULL    | auto_increment | select,insert,update,references |         |<br />
| IPADDR           | varchar(15)         | latin1_swedish_ci | NO   | MUL |         |                | select,insert,update,references |         |<br />
+------------------+---------------------+-------------------+------+-----+---------+----------------+---------------------------------+---------+<br />
<br />
mysql&gt; show global variables like '%collation%';<br />
+----------------------+-------------------+<br />
| Variable_name        | Value             |<br />
+----------------------+-------------------+<br />
| collation_connection | latin1_swedish_ci |<br />
| collation_database   | latin1_swedish_ci |<br />
| collation_server     | latin1_swedish_ci |<br />
+----------------------+-------------------+<br />
3 rows in set (0.00 sec)]]></description>
            <dc:creator>Tuan Ta</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Sat, 29 Oct 2011 19:39:15 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?103,484295,484295#msg-484295</guid>
            <title>Fixing Double Enocoding With mysqldump (3 replies)</title>
            <link>http://forums.mysql.com/read.php?103,484295,484295#msg-484295</link>
            <description><![CDATA[ Hi, I've just diagnosed my problem as &quot;Double Encoding&quot; as described by Rick James' incredibly helpful page at <a href="http://mysql.rjweb.org/doc.php/charcoll"  rel="nofollow">http://mysql.rjweb.org/doc.php/charcoll</a>.<br />
<br />
Indeed I have UTF8 data going in, a connection (erroneously) set to Latin1, and a database and tables set to UTF8.  One 2 byte UTF8 character in ends up encoded as 4 bytes in my tables.<br />
<br />
My question is about fixing it.  It seems like by far the easiest thing to do would be:<br />
<br />
1.  mysqldump --default-character-set=latin1 ....  my_database &gt; my_database_latin1.sql<br />
2.  Edit my_database_latin1.sql to set NAMES=utf8 at the top.<br />
3. mysql ... &lt; mydatabase.sql<br />
<br />
The dump should convert the 4 bytes which it thinks are 2 utf8 characters back down to 2 bytes (2 latin1 characters).  The file should actually contain UTF8, though it thinks it's latin1.  So change the encoding of the connection set at the top of the file to UTF8, and import this data back into the same database.<br />
<br />
Since Rick doesn't quite mention this fix, I'm assuming I'm missing something. A quick test does look ok so far.  <br />
<br />
Am I missing something?<br />
<br />
Thanks for the help - Peter]]></description>
            <dc:creator>Peter Berry</dc:creator>
            <category>Character Sets, Collation, Unicode</category>
            <pubDate>Wed, 26 Oct 2011 18:15:44 +0000</pubDate>
        </item>
    </channel>
</rss>
