Accented characters in TEXT field getting mangled
Jonathan Abrams <[email protected]>
| Newsgroups | gmane.comp.db.mysql.java |
|---|---|
| Message-ID | <[email protected]> |
I am developing a web application using Java/Tomcat and MySQL 4.1.12 with Connector/J 3.13.13. When I save something with an accent like "Café" to a VARCHAR column, it works fine on both my development Windows XP laptop, and our production Linux server. When I save something with an accent into a TEXT column, it works fine on the Windows box, but the Linux systems return "Café". The code I am using to set the TEXT column value is: byte[] bytes = text.getBytes(); InputStream textInputStream = new ByteArrayInputStream(bytes); preparedStatement.setAsciiStream(1, textInputStream, bytes.length); Obviously I am doing something wrong since the unicode is getting messed up on the production db, although I'm confused as to why it's working ok on my dev windows box. Do I need to be doing something different? setCharacterStream? setUnicodeStream? setClob() ? Thanks! Jonathan -- MySQL Java Mailing List For list archives: http://lists.mysql.com/java To unsubscribe: http://lists.mysql.com/[email protected]