This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Displaying Greek values read from Database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Displaying Greek values read from Database" Watch "Displaying Greek values read from Database" New topic

Displaying Greek values read from Database

Sridhar Karanam

Joined: Feb 23, 2006
Posts: 2
Hi Friends,

I have a problem in dispalying Greek values. I am using SQL Server database. And in one of the tables i am having greek values. In the table i can see the value appearing in greek language, but when i dispaly it on my console i am getting the values as ???.

This is my code, can anybody please tell me what are the changes to be made to this code.

Connection con = null;

try {
con = DriverManager.getConnection("jdbc:jtds:sqlserver://;user=sapdata;password=sapdata;");
Statement s = con.createStatement();
ResultSet rs = s.executeQuery("select * from VIEW_Identifier where id='100005'");
String temp = rs.getString("Field_Value");
System.out.println("The value is :"+temp);

catch (Exception e) {

This is the greek value
The output i get is

Thanks for any help
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42958
Welcome to JavaRanch.

What character encoding does the DB use? Is your console capable of displaying Unicode (or even just ASCII above 127) characters? Many consoles can only display ASCII properly.
I agree. Here's the link:
subject: Displaying Greek values read from Database
It's not a secret anymore!