List:MySQL and Java« Previous MessageNext Message »
From:Igor Smirnov Date:August 31 2004 8:57am
Subject:Re: Character encoding.
View as plain text  
I haven't worked with 4.1.X so I have no idea why
aren't you getting the same results. Are your tables
created with the same script, in the same way that is?
You start mysql with the same parameters?
regards,
igor

--- Abo Pignard <abo.pignard@stripped> wrote:

> Hi all.
> 
> I have no better result with MySQL 4.1.3 (Mac OS X
> release) and Java 
> connector 3.1.3.
> So I switch back to MySQL 4.0.18 then accents are
> writen in a good way.
> I guess it appears on version 4.1 of MySQL.
> 
> Is there a configuration parameter or a fix? Or some
> thing else?
> 
> Thanks for your answer.
> 
> 		Best regards, Pascal.
> 		http://perso.wanadoo.fr/blady
> 
> 
> Le 7 ao> 
> > Hello Igor, thanks for your answer.
> >
> > It seems to have the same behaviour with this
> setting.
> >
> 		Best regards, Pascal.
> 		http://perso.wanadoo.fr/blady
> 
> >
> > Le 5 ao> >
> >> Try setting "unicode" in the connection string:
> "setUnicode=true"
> >>  
> >> Hope it helps
> >>
> >> Abo Pignard <abo.pignard@stripped> wrote:
> >> Hello,
> >>
> >> I use an MySQL 4.1.2 database server.
> >> I execute Java queries with the connector 3.1.2.
> >>
> >> As described in MySQL documentation the defaut
> caracter encoding is
> >> latin1 or ISO8859_1:
> >> CREATE TABLE `editeurs` (
> >> `ns` int(11) unsigned NOT NULL auto_increment,
> >> `nom` char(40) default NULL,
> >> PRIMARY KEY (`ns`)
> >> ) ENGINE=MyISAM DEFAULT CHARSET=latin1
> >>
> >> Command line : UPDATE `editeurs` SET
> `nom`="Deno> >> (second e with umlaut, > >>
> >> When I read a string with accent, I get the good
> ones :
> >> public String getEditeurs(String val) throws
> SQLException {
> >> String editeur = null;
> >> ResultSet res = stmt.executeQuery(
> >> "select nom"
> >> + " from editeurs"
> >> + " where upper(nom) like \"%" +
> >> val.toUpperCase()
> >> + "%\";");
> >> if (res != null)
> >> while (res.next()) {
> >> editeur = res.getString("nom");
> >> }
> >> if (res != null) res.close();
> >> return editeur;
> >> }
> >>
> >> => Deno> >>
> >> But when I write a string with accent I got wrong
> caracter when I read
> >>  it again:
> >> public int createEditeurs(String nom) throws
> SQLException {
> >> return stmt.executeUpdate(
> >> "insert into editeurs (nom)"
> >> + " values (\""
> >> + nom
> >> + "\");");
> >> }
> >>
> >> => Deno> >>
> >> Is there some configuration variable to set
> either in MySQL server or
> >> on J-Connector?
> >>
> >> Thanks in advance for your answers.
> >>
> >> Best regards, Pascal.
> >> http://perso.wanadoo.fr/blady
> >>
> >> PS : I home you will read the accent in my
> e-mail.
> >>
> >>
> >> Do you Yahoo!?
> >>  Yahoo! Mail is new and improved - Check it out! 
> >>  



		
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush
Thread
Character encoding.Abo Pignard4 Aug
Re: Character encoding.Abo Pignard7 Aug
  • Re: Character encoding.Abo Pignard30 Aug
    • Re: Character encoding.Igor Smirnov31 Aug
      • Re: Character encoding.Abo Pignard2 Sep
        • Re: Character encoding.Mark Matthews2 Sep