6 messages in com.mysql.lists.javaRe: getString() on BLOB field contain...| From | Sent On | Attachments |
|---|---|---|
| Arjohn Kampman | 27 Oct 2004 03:59 | |
| Mark Matthews | 27 Oct 2004 07:00 | |
| Arjohn Kampman | 27 Oct 2004 07:22 | |
| Mark Matthews | 27 Oct 2004 08:07 | |
| Arjohn Kampman | 27 Oct 2004 09:50 | |
| Mark Matthews | 27 Oct 2004 09:58 |
| Subject: | Re: getString() on BLOB field containing unicode returns wrong value![]() |
|---|---|
| From: | Mark Matthews (ma...@mysql.com) |
| Date: | 10/27/2004 08:07:03 AM |
| List: | com.mysql.lists.java |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Arjohn Kampman wrote:
Mark Matthews wrote:
Arjohn,
Blobs don't have a character set associated with them (by design). If you want to store non-Binary data that is 'character-set aware', you should use one of the TEXT types. If you use getString() on a Blob when talking to MySQL-4.1, the server tells the driver to use the 'binary' character set, which for 'stringifying' purposes is ASCII.
Thanks for the quick response. The problem with the TEXT types is that they are case-insenstive by default and that I really need a case-sensitive field type. Using collation makes our software incompatible with older server versions. Guess this means that we'll have to do the conversion from characters to bytes and vice-versa ourselves:-(
Thanks anyway,
Arjohn
Arjohn,
There are case-sensitive variants (they all end with _cs) of all the collations we ship in MySQL-4.1, can you not use one of those in combination with a TEXT field?
Regards,
-Mark
- -- 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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBf7mstvXNTca6JD8RApQgAKCCDjz1Hdt0yZAQn/6oobQxIhSeiwCfdXgd b1HBLkIRKNzQAU6TcBjHlgc= =YhQ5 -----END PGP SIGNATURE-----




