File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

String.getBytes("Cp1047") get wrong values for 25 and 15 for packed decimal value.

Siva Vu
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Retrieving string from DB2 (Z/OS) (JDBC)
that does contain packed decimal value.

When I am trying to get bytes using String.getBytes("Cp1047"),
I am getting correct bytes for all
Excpet for 15 and 25.
Rather it is resulting in swapped values for these,
i.e, it is getting 25 for 15 and vice versa.

What could be the wrong?
Or should I read bytes directly from ResultSet
using ResultSet.getBinaryStream("COLUMN") ?

Or do 15 and 25 have some special meaning on the
Java Platform.
Thanks in advance.
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic