Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-16540

The use of EMBED Chinese information read from MySQL is garbled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.6.4
    • Fix Version/s: 6.0.0
    • Component/s: Embedded Languages
    • Labels:
      None
    • Environment:
      mysql: win2008X64
      eclide5.6.4-1: win7 x64
      hpcc:5.6.8

      Description

      The use of EMBED Chinese information read from MySQL is garbled.
      ECL CODE:
      IMPORT MySQL;

      childrec := RECORD
      UNICODE8 name,
      integer4 value

      { default(99999) }

      ,
      boolean boolval

      { default(true) }

      ,
      real8 r8

      {default(99.99)}

      ,
      real4 r4

      {default(999.99)}

      ,
      DATA d

      {default (D'999999')}

      ,
      DECIMAL10_2 ddd

      {default(9.99)}

      ,
      UTF8 u1 ,
      UNICODE8 u2
      END;
      dataset(childrec) testMySQLDS() := EMBED(mysql : user('root'),password('root'),database('mbs'),server('10.10.5.210'), port('3306'))
      SELECT * from tbl2;
      ENDEMBED;
      output(testMySQLDS());

      mysql:
      CREATE TABLE `tbl2` (
      `name` VARCHAR(20) NULL DEFAULT NULL COLLATE 'utf8_general_ci',
      `value` INT(11) NULL DEFAULT NULL,
      `boolval` TINYINT(4) NULL DEFAULT NULL,
      `r8` DOUBLE NULL DEFAULT NULL,
      `r4` FLOAT NULL DEFAULT NULL,
      `d` BLOB NULL,
      `ddd` DECIMAL(10,2) NULL DEFAULT NULL,
      `u1` VARCHAR(10) NULL DEFAULT NULL COLLATE 'utf8_general_ci',
      `u2` VARCHAR(10) NULL DEFAULT NULL COLLATE 'utf8_general_ci'
      )
      COLLATE='utf8_general_ci'
      ENGINE=InnoDB
      ;
      INSERT INTO `tbl2` (`name`, `value`, `boolval`, `r8`, `r4`, `d`, `ddd`, `u1`, `u2`) VALUES
      ('人', NULL, NULL, NULL, NULL, NULL, NULL, '中', '热');

        Attachments

        1. ecl_code.png
          ecl_code.png
          102 kB
        2. eclide_about.png
          eclide_about.png
          40 kB
        3. eclide_result.png
          eclide_result.png
          38 kB
        4. mysql_ecl_in_eclide.png
          mysql_ecl_in_eclide.png
          31 kB
        5. mysql_result.png
          mysql_result.png
          32 kB
        6. Query_record_from_mysql.png
          Query_record_from_mysql.png
          16 kB
        7. Record_stored_in_MySQL.png
          Record_stored_in_MySQL.png
          15 kB
        8. set_names_err.png
          set_names_err.png
          36 kB

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              xuefugui xuefugui
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: