You did two things in your test: (1) Get the data from the database; (2) Display the data on the console. So what you should do is to test the two things separately. To test (1) your Java code should read a known string from a specific database row and column and test whether it contains the expected data. To test (2), do what you already did.
And this console you used for the test: it isn't the AS/400 operator console, is it? So what exactly is it? A 5250 device, a Windows command line, or what?
Paul Clapham wrote:To test (1) your Java code should read a known string from a specific database row and column and test whether it contains the expected data.
You need more specific? Okay. Choose a table which contains this Greek-letter data. Choose one row from it. Choose one column which contains some Greek-letter data.
Write an SQL query which selects only that column from only that row in the table. Execute the query in your Java code and get the data from that column into a Java string using rs.getString(1).
Now you know exactly what data you should get. So compare the characters which you get to the Unicode values of the characters which you can see in the database. (Here's a link which tells you the Unicode values of Greek letters: Greek and Coptic.) If they are different, that means that you need to do something with your database connection. If they are the same, then your console is not configured correctly.
Joined: Dec 07, 2012
I do the rs.getstring
I Will compare it monday at work...
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com