Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Problem With Utf8

forums forums SQLyog SQLyog BETA Discussions Problem With Utf8

  • This topic is empty.
Viewing 15 reply threads
  • Author
    Posts
    • #10311
      uyuni
      Member

      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.

    • #23891
      peterlaursen
      Participant

      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

    • #23892
      uyuni
      Member

      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

    • #23893
      peterlaursen
      Participant

      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!

    • #23894
      peterlaursen
      Participant

      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?

    • #23895
      peterlaursen
      Participant

      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%';
    • #23896
      uyuni
      Member

      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/

    • #23897
      peterlaursen
      Participant

      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!

    • #23898
      uyuni
      Member

      Any news?

    • #23899
      peterlaursen
      Participant

      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!

    • #23900
      peterlaursen
      Participant

      here comes the images

    • #23901
      peterlaursen
      Participant

      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!

    • #23902
      Rohit
      Member

      The new RC(RC1) has fixed this issue.

      Please confirm!

    • #23903
      uyuni
      Member

      It seeems OK now!

      Thanx,

      Emilio

    • #23904
      jordan
      Member

      No different results with VARCHAR and TEXT types.

    • #23905
      peterlaursen
      Participant

      @jordan

      What is the message that you are trying to convey?

      Please use this Forum a little more responsible! You are taking other peoples time!

Viewing 15 reply threads
  • You must be logged in to reply to this topic.