This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JDBC and the fly likes Unicode Characters Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Unicode Characters" Watch "Unicode Characters" New topic
Author

Unicode Characters

M. White
Greenhorn

Joined: Dec 27, 2009
Posts: 18

Everytime I fetch data (mostly strings ) from mysql database, several characters were replaced by "??". Is there a way I can preserve the original value? Thanks for the help.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35241
    
    7
Which characters are those, and how do you know they went bad - are you printing them to a console? If so, be aware that many console can't handle anything but ASCII.


Android appsImageJ pluginsJava web charts
M. White
Greenhorn

Joined: Dec 27, 2009
Posts: 18

Characters like ’ and é. I displayed it in eclipse console. By the way, I changed the Encoding to UTF-8 in Preferences-General-Editor. Also in debug mode, when i view the values in the Variables tab, the characters were also replaced by ??. Thanks for the response.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35241
    
    7
I don't know whether the Eclipse console (or Variables tab) can handle Unicode; you might want to verify that by in other way.
And just to ask the obvious: the DB encoding is set to something that can handle those characters, and they are still OK in the DB?
M. White
Greenhorn

Joined: Dec 27, 2009
Posts: 18

Yes. The values are still preserved in the db.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Unicode Characters
 
Similar Threads
Limit JTextField number of characters
Rest Response adding extra characters
3d software
max length of doGet() request supported by browser
Scott Adams' depiction of IIT grads