Some of the text retrieved from the database (either from varchar columns or via 'SHOW COLUMNS' from which I extract the possible ENUM values), with extend characters (such as ã or ç) are showing as "???".
I have no idea why this happens. It has no pattern for this behaviour.
First I tought it had something to do with characters sets and collation settings, so I've tried fixing it, but it wasn't it (the default character set - latin1 - is correct, and the collation has nothing to do with, so I figured a little bit later).
I have 96 tables in my database, and this is happening in two of them. They are NOTHING like one another.
the first:
CREATE TABLE `SCA_Grupo` (
`nu_grupo` int(10) unsigned NOT NULL auto_increment,
`cd_sistema` char(3) collate latin1_german1_ci NOT NULL default '',
`nm_grupo` varchar(60) collate latin1_german1_ci NOT NULL default '',
`ds_grupo` varchar(255) character set latin1 NOT NULL default '',
PRIMARY KEY (`nu_grupo`,`cd_sistema`),
KEY `cd_sistema` (`cd_sistema`),
KEY `nu_grupo` (`nu_grupo`,`cd_sistema`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci
the other one:
CREATE TABLE `GPC_PadraoProjecao` (
`id_padrao` int(11) NOT NULL auto_increment,
`vl_pct_juros` decimal(11,8) default NULL,
`dt_vigencia` varchar(40) character set latin1 default NULL,
`vl_indice_correcao` decimal(11,8) default NULL,
`dt_correcao` varchar(40) character set latin1 default NULL,
`vl_pct_considerado` decimal(11,8) default NULL,
`id_regra` int(11) NOT NULL default '0',
`tp_juros` enum('Simples','Composto') character set latin1 NOT NULL default 'Simples',
`nm_origem_pedido` enum('Carvalho','ENCOL','Simulação') collate latin1_german1_ci NOT NULL default 'Carvalho',
PRIMARY KEY (`id_padrao`),
KEY `id_padrao` (`id_padrao`),
KEY `id_regra` (`id_regra`),
KEY `dt_vigencia` (`dt_vigencia`),
KEY `dt_correcao` (`dt_correcao`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci
In the first table all the extended characters in the nm_grupo and ds_grupo come out as "?". In the second table, when I extract the enum values to show them in a combo-box, the value 'Simulação' come out as 'Simula????o'.
I'm using Java and already downloaded the latest version of the driver.
ANY CLUES? Thanks in advance.
Christian