Special characters are displayed differently between portable and non-portable versions

pa.dijon's profile image pa.dijon posted 4 weeks ago in HeidiSQL portable Permalink

Anglais

Hello

I use Laragon mint with mysql version 5.1.72 win 32 and hedisql portable version 10.2.0.5599.
When I use HeidiSql portable version 12.8.0.6908, there is a difference in the display of rows from the same table

Example With Heidisql 10.2.0.5599 > "Modélisation et prototypage 3D" With Heidisql 12.8.0.6908 > "Modélisation et prototypage 3D"

What's wrong ? How can I fix it ?

Thanks

Pierre


Français Bonjour

J'utilise Laragon Mint avec mysql version 5.1.72 win 32 et hedisql version portable 10.2.0.5599.
Lorsque j'utilise la version portable HeidiSql 12.8.0.6908, il y a une différence dans l'affichage des lignes d'une même table

Exemple Avec Heidisql 10.2.0.5599 > « Modélisation et prototypage 3D » Avec Heidisql 12.8.0.6908 > « Modernisation et prototypage 3D »

Qu'est-ce qui ne va pas ? Comment puis-je le réparer ?

Merci Pierre

ansgar's profile image ansgar posted 4 weeks ago Permalink

You're comparing the 5 years old v10.2 with the current v12.8. Please only use the current version when reporting issues - there are many things which are already fixed in the current version.

MySQL v5.1 is even older, from 2013, now 11 years old. Be aware this could also cause character display issues.

Well, in almost any case of such character issues it was due to a wrong character set of the table and/or database. Please post the CREATE TABLE code of the broken table here.

In some other cases such character problems could be solved by using an older libmysql.dll in the session settings.

pa.dijon's profile image pa.dijon posted 4 weeks ago Permalink

Hello Thanks for the answer.

I know I'm not using the latest versions. I'm trying to fix this

CREATE TABLE code for table 'suj_gen_t_spe_sp' (HeidiSQL version 12)

CREATE TABLE `suj_gen_t_spe_sp` (
    `SP_ID` INT(11) NOT NULL AUTO_INCREMENT,
    `SP_EXA_REF` INT(11) NULL DEFAULT NULL,
    `SP_COD` CHAR(15) NULL DEFAULT NULL COLLATE 'utf8_general_ci',
    `SP_LIB_LG` CHAR(250) NULL DEFAULT NULL COLLATE 'utf8_general_ci',
    `SP_LIB_CRT` CHAR(25) NULL DEFAULT NULL COLLATE 'utf8_general_ci',
    `SP_MAJ` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`SP_ID`) USING BTREE,
    UNIQUE INDEX `SP_EXA_REF_SP_COD` (`SP_EXA_REF`, `SP_COD`) USING BTREE,
    INDEX `SP_LIB_LG` (`SP_LIB_LG`) USING BTREE,
    CONSTRAINT `suj_gen_t_spe_sp_ibfk_1` FOREIGN KEY (`SP_EXA_REF`) REFERENCES `suj_gen_t_exa_ex` (`EX_ID`) ON UPDATE RESTRICT ON DELETE RESTRICT
)
COMMENT='Table spécialités'
COLLATE='utf8_general_ci'
ENGINE=InnoDB
ROW_FORMAT=COMPACT
AUTO_INCREMENT=580
;

TABLE CREATION Table HeidiSQL version 10

CREATE TABLE `suj_gen_t_spe_sp` (
    `SP_ID` INT(11) NOT NULL AUTO_INCREMENT,
    `SP_EXA_REF` INT(11) NULL DEFAULT NULL,
    `SP_COD` CHAR(15) NULL DEFAULT NULL,
    `SP_LIB_LG` CHAR(250) NULL DEFAULT NULL,
    `SP_LIB_CRT` CHAR(25) NULL DEFAULT NULL,
    `SP_MAJ` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`SP_ID`),
    UNIQUE INDEX `SP_EXA_REF_SP_COD` (`SP_EXA_REF`, `SP_COD`),
    INDEX `SP_LIB_LG` (`SP_LIB_LG`),
    CONSTRAINT `suj_gen_t_spe_sp_ibfk_1` FOREIGN KEY (`SP_EXA_REF`) REFERENCES `suj_gen_t_exa_ex` (`EX_ID`)
)
COMMENT='Table spécialités'
COLLATE='utf8_general_ci'
ENGINE=InnoDB
ROW_FORMAT=COMPACT
AUTO_INCREMENT=580
;

we notice that the comment is not written in the same way

Another exemple, using procédure

CREATE DEFINER=`root`@`localhost` PROCEDURE `SUJ_0_P_T_JOURNAL_INSERT`(
    IN `p_txt` TEXT






)
LANGUAGE SQL
NOT DETERMINISTIC
CONTAINS SQL
SQL SECURITY DEFINER
COMMENT ''
BEGIN
INSERT INTO suj_0_t_journal_j
    (j_txt)
    VALUES (p_txt)
    ;
END

Heidsql version 12 CALL SUJ_0_P_T_JOURNAL_INSERT('école');

/ Avertissement: (1366) Incorrect string value: '\xE9cole' for column 'p_txt' at row 1 / Insert an empty line

Hedisql version 10 CALL SUJ_0_P_T_JOURNAL_INSERT('école');

no avertissement insert "école" line

ansgar's profile image ansgar posted 4 weeks ago Permalink

After creating your table here I get the same error on a MySQL 5.1.73 server when inserting a row:

INSERT INTO `test`.`suj_gen_t_spe_sp` (`SP_COD`) VALUES ('äöü');
/* SQL-Fehler (1366): Incorrect string value: '\xE4\xF6\xFC' for column 'SP_COD' at row 1 */

No error on MariaDB 11.3.

Both ones use utf8 charset in all columns.

Please try the different libraries in the session settings.

Please login to leave a reply, or register at first.