Re: Java and MySQL character sets
"Ahmet ÜK" <[email protected]>
| Newsgroups | gmane.comp.db.mysql.java |
|---|---|
| Message-ID | <[email protected]> |
hey, i'm new with java but i know MySQL, in 5.0 doc, they say for Turkish and some other latin characters, use UCS-2... 2006/5/17, Paul Wallace <[email protected]>: > > Hey, > Here is a tiny fragment of what you may need from way back. To > (successfully) get Chinese in to MySQL I used this connection string. > The corresponding MySQL db / table(s) were I recall set to InnoDB. > > String conString = "jdbc:mysql://" + Utils.getParam("db_host", > parentNode) + "/" > + Utils.getParam("db_name", parentNode) + "?user=" + > Utils.getParam("username", parentNode) > + "&password=" + Utils.getParam("password", > parentNode) > + "&characterEncoding=UTF-8"; > > connection = DriverManager.getConnection(conString); > > I short, my solution was double ended. The character encoding required > setting on the connection string, and InnoDB on MySQL. Unicode was not > in the argument as Java supports Unicode as standard. > > That's all I can recall for my touch on multilingualism. Hope it points > you in the right direction. Or some can correct my inaccuracies here. > > Rgds > > Paul. > > > Hi everyone, > > I am trying to develop an multi-language application that will use i18n. > What is the best character set and collation to use with Java 5, JDBC > and MySQL 5? There are way too many variations, UTF-8, UTF-16, UCS-2 for > character codes, and a lot more collation types! I checked the Java > specs and it says Java supports Unicode 4.0 but how does this map to > MySQL?? > > Thanks, > Drew > > > -- > MySQL Java Mailing List > For list archives: http://lists.mysql.com/java > To unsubscribe: http://lists.mysql.com/[email protected] > >