Hi Marco, I'm guessing the text is stored correctly as UTF-8 in the database. The "Ã " symbol showing up instead of "à" indicates that it's stored as UTF-8 but reading or displaying it as windows-1252 (western european).
Type "sfasdfasdfasdà" in notepad. Save it as UTF-8. Then in the bottom right corner change the encoding to Western European. You'll see "sfasdfasdfasdà " If you're viewing it in a Webpage, the first thing I would check is make sure that in the browser the "view -> encoding is set to UTF-8 and not Western European or something else. If utf-8 and still not showing up correctly somewhere along the lines you'd need to specify to JDBC to fetch it as UTF-8. Let me know how it goes as I need UTF-8 support in my next app. Fredrik -----Original Message----- From: marco turchi [mailto:[EMAIL PROTECTED] Sent: Friday, June 01, 2007 11:44 AM To: [email protected] Subject: Re: UTF8 problem Dear Andrus, I have not the admin privileges, so I cannot use mydb :-( I'll ask to the administrator to check it for me. Should I add the "useUnicode=true" parameter in the same place of "characterEncoding=UTF-8"? Thanks Marco On 6/1/07, Andrus Adamchik <[EMAIL PROTECTED]> wrote: > I still suspect that this is a JDBC or MySQL problem, not Cayenne. > Here is another URL parameter you may try: "useUnicode=true". Also > you may want to doublecheck whether database was configured to > support UTF-8. Enter "mysql" prompt and do something like this: > > > use mydb; > > status; > > This should print a bunch of info, including this: > > Server characterset: utf-8 > Db characterset: utf-8 > Client characterset: utf-8 > Conn. characterset: utf-8 > > If it prints anything other than utf-8, you may need to recreate the > DB with an appropriate charset. > > Andrus > > > On Jun 1, 2007, at 8:07 PM, marco turchi wrote: > > Dear Kevin, > > I have tried, but nothing has changed. > > here I have an Italian example of my problem: > > 1a)Assemblea e scontro in redazione per l'allegato di Michela > > Brambilla Interviene anche il direttore Belpietro: "Il quotidiano sarà > > in edicola" Inserto dei "Circoli della Libertà" e al "Giornale" scatta > > lo sciopero > > 1b)Assemblea e scontro in redazione per l'allegato di Michela > > Brambilla Interviene anche il direttore Belpietro: "Il quotidiano sarà > > in edicola" Inserto dei "Circoli della Libertà " e al "Giornale" > > scatta lo sciopero > > > > where 1a is obtained directly by mysql, and 1b is obtained by Java/ > > Cayenne. > > A difference that I have noticed is that: > > if I write on two different files the sentence using mysql for 1a and > > Java for 1b. The first is encoded as UTF-8 Unicode English text,while > > the second as UTF-8 Unicode text. > > Sorry about that. > > > > Thanks > > Marco > > > > > > On 6/1/07, Kevin Menard <[EMAIL PROTECTED]> wrote: > >> > -----Original Message----- > >> > From: marco turchi [mailto:[EMAIL PROTECTED] > >> > Sent: Friday, June 01, 2007 9:26 AM > >> > To: [email protected] > >> > Subject: Re: UTF8 problem > >> > > >> > I'm using Cayenne 1.2.1, could the version be the problem? > >> > Note that the languages of my shell are: > >> > en_GB.UTF-8:en_GB:en > >> > >> I don't know for certain that this will fix your problem, but you > >> should > >> probably try 1.2.3. It's the latest 1.2.x release, is fully > >> backward-compatible with 1.2.1, and includes a decent number of bug > >> fixes. > >> > >> -- > >> Kevin > >> > > > >
