List:MySQL and Java« Previous MessageNext Message »
From:Abo Pignard Date:September 2 2004 10:07am
Subject:Re: Character encoding.
View as plain text  
Hi Igor, yes I use the same creation script for the tables and the same 
Java Source with MySQL 4.0.18 and 4.1.3.

Do I have to report this situation to MySQL list or other?

		Best regards, Pascal.
		http://perso.wanadoo.fr/blady


Le 31 août 04, à 10:57, Igor Smirnov a écrit :

> 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ût 04, à 12:23, Abo Pignard a écrit :
>>
>>> 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ût 04, à 13:15, Igor Smirnov a écrit :
>>>
>>>> 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ël" WHERE `ns` = "10"
>>>> (second e with umlaut, ë in html convention)
>>>>
>>>> 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ël : good e with umlaut.
>>>>
>>>> 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‘l : bad caracter
>>>>
>>>> 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