> Say, for example, I want to run an insert like the following:
>
[quoted text clipped - 26 lines]
>
> Many thank to anyone who can clarify this issue.
Gregg,
You'd need to use a characterEncoding of 'utf8', but you'll also need to
make sure that your tables can actually hold those values as well. You
don't say what version of MySQL you're using, but 4.1 is the version
where you can start 'mixing' character sets...MySQL-4.0 was basically
only one character-set per server and didn't understand utf-8.
-Mark

Signature
Mr. Mark Matthews
MySQL AB, Software Development Manager, J2EE and Windows Platforms
Office: +1 708 332 0507
www.mysql.com
MySQL Guide to Lower TCO
http://www.mysql.com/it-resources/white-papers/tco.php
Barley - 17 Sep 2004 18:58 GMT
Thanks very much for your help, Mark, but I'm still missing something.
MySql version 4.1.4-gamma which I believe supports utf8.
My table is set to use the 'utf8' characterEncoding, and the
'utf_general_ci' collation (I have tried several other collations). My
connection url looks like:
jdbc:mysql://localhost/test?user=test&password=test&useUnicode=true&characte
rEncoding=utf8&characterSetResults=utf8
When I execute the same SQL I originally posted, gibberish characters are
inserted. The 'one quarter' symbol is in there, but so is a lot of other
noise.
What am I doing wrong? I know that my table can store these characters,
because I have pasted the String from Word into MySqlCC. Works just fine.
Thanks to anyone who can offer help.
Gregg
> > Say, for example, I want to run an insert like the following:
> >
[quoted text clipped - 5 lines]
> >
> > If I create my JDBC url like this:
jdbc:mysql://localhost/test?user=test&password=test&useUnicode=true&characte
> > rEncoding=cp1250
> >
> > then the curly quote is successfully inserted, but not the 'one quarter'
> > symbol. However, if I create the url in this way:
jdbc:mysql://localhost/test?user=test&password=test&useUnicode=true&characte
> > rEncoding=latin1
> >
[quoted text clipped - 19 lines]
>
> -Mark