forums › forums › SQLyog › SQLyog BETA Discussions › Problem With Utf8
- This topic is empty.
-
AuthorPosts
-
-
May 1, 2007 at 11:41 am #10311uyuniMember
I have a table with fields of type text with Collation latin1_swedish_ci.
I've done: set names 'utf8';
The result in the result-tab gives me different results for
SELECT text
and for
SELECT substr(text,1,200)
See Screenshot.
SQLYog 6, Beta 4.
-
May 2, 2007 at 11:22 am #23891peterlaursenParticipant
please tell the exact server version!
also if you can connect with commandline please check if it does better!
I am not sure, but this looks mostly like a server issue (a bug with the implementation of the SUBSTR() function). I will not make much sense to try reproducing with another server version! I cannot reproduce here with MySQL 5.0.37 and Danish characters
-
May 6, 2007 at 11:59 am #23892uyuniMember
Serverversion is 4.1.16-nt.
The difference is there even when using SUBSTR twice, it depends on the substring-length, see screenshot.
The result is OK when using the commandline, see screenshot.
Emilio
-
May 6, 2007 at 12:19 pm #23893peterlaursenParticipant
Thanks for the details! We will study this!
Still it might help if you created a small 'dummy' table with a few rows of data, exported it, zipped and attached here.
What is the locale/language of you windows?.
Please explain 'it depends on the substring length'.
In SQLyog “SELECT 'ö'” and “SELECT substr('ö',1,200)” should return the same. 'ö' simply. I cannot make it do different than that. See attached!
-
May 6, 2007 at 12:32 pm #23894peterlaursenParticipant
OK .. I overlooked the point that data were stored as TEXT.
Now with this table
CREATE TABLE `test2` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`text` varchar(50) DEFAULT NULL,
`text2` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
I get the attached result.
Do you have different results with VARCHAR and TEXT types?
-
May 6, 2007 at 3:30 pm #23895peterlaursenParticipant
I wonder if your problem could be an 'incarnation' of this bug with mySQL itself:
http://bugs.mysql.com/bug.php?id=20204
This is fixed only in the very latest releases (such as 4.1.22). Is it possible for you to upgrade the server?
also please let us see the results of
Code:SHOW VARIABLES LIKE '%character%'; -
May 7, 2007 at 5:28 pm #23896uyuniMember
It cannot be the MySQL-bug because I use a MYISAM table.
I send you an SQL-export.
Do this:
– Run script
– run
select id,substr(text,1,196),substr(text,1,197) from utferror where id=10;
The result is NOT OK
– open “table data”, the result for the column 'text' is NOT OK
– change the value of column 'text', add Umlaut-characters (öäü). They are displayed correctly in the editor window. When you close the editor-window with “OK” then the value is wrong in the “table data”-tab!
SHOW VARIABLES LIKE '%character%';
character_set_client;utf8
character_set_connection;utf8
character_set_database;latin1
character_set_results;utf8
character_set_server;latin1
character_set_system;utf8
character_sets_dir;D:\Programme\MySQL\share\charsets/
-
May 7, 2007 at 7:03 pm #23897peterlaursenParticipant
I am not sure whether this MySQL bug affect only InnoDB. The example they use in the bug report is InnoDB, but the changelogs do not mention any specific table type!
We will look into your dump and other details tomorrow.
And from the charset path I can figure out that you are running a German localised Windows. Mine is Danish and as both are ANSI-western codepage I should be able to reporduce everythong that you experience, æ or ä and ø or ö makes no difference!
-
May 23, 2007 at 12:21 pm #23898uyuniMember
Any news?
-
May 23, 2007 at 1:12 pm #23899peterlaursenParticipant
I am sorry, but it seems that we forgot this one.
One thing that surprises me is that you create the table like '..DEFAULT CHARSET=latin1'. I do not understand how this is unicode related then? please explain!
Also please see 1st attached image. Ii am not even able to insert that long string without 'ööö' becoming garbled in the display. And that no matter if table charset is latin1 or utf8. Sever is 5.0.41 (i do not have 4.1.x here).
2nd attached image. Depending on the length of the substring it will garble! We will have to find out now if SQlyog garbles or MySQL does!
Thanks for persistency!
-
May 23, 2007 at 1:14 pm #23900peterlaursenParticipant
here comes the images
-
May 23, 2007 at 2:01 pm #23901peterlaursenParticipant
OK .. confirmed to be a GRID related bug in SQLyog. If you 'show results in text' it displays correctly!
We will work on that NOW!
-
May 26, 2007 at 4:14 am #23902RohitMember
The new RC(RC1) has fixed this issue.
Please confirm!
-
June 13, 2007 at 6:47 am #23903uyuniMember
It seeems OK now!
Thanx,
Emilio
-
October 11, 2007 at 8:16 am #23904jordanMember
No different results with VARCHAR and TEXT types.
-
October 11, 2007 at 8:38 am #23905peterlaursenParticipant
What is the message that you are trying to convey?
Please use this Forum a little more responsible! You are taking other peoples time!
-
-
AuthorPosts
- You must be logged in to reply to this topic.