• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

IBM DB2 AS400 data encoding issue

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

We are using IBM DB2 AS400 DB and we have a leagacy DB which is being encoded with EBCDIC encoding to store japanese double byte characters, the problem is when i am trying to access this with JAVA code i am getting all junk characters. can anyone help with this as how to convert the Result set data to a proper values.

here is the example of the junk charater
ギフケン ヨウロウグン , ヨウロウチヨウ , ァ£ァカ・ォゥ`ゥオゥヒ

These are the three sample columns having double byte Katakana and Kanji characters but when i fetch them with java i get this junk characters.

Any help regarding PLEASE.
 
Marshal
Posts: 27214
87
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
EBCDIC? Which kind of EBCDIC is that?

And when you access the data, which database driver are you using? And what parameters did you specify in the JDBC URL? Does the driver have parameters for specifying charset?

And what characters are you actually seeing? What you posted looks like Japanese to me, so "all junk characters" doesn't agree with what you posted. Also, how are you displaying the characters? Did you check them as soon as you got them from the database, or did you do something else with them (like displaying them at the console) as well?

You're going to have to look at the details. Just telling us you have a problem isn't helpful.
 
echarish Kumar
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Encoding at DB is
CCSID 5035 (decimal)
13AB (hex)
Name JAPAN MIX EBCDIC

here are the details
driver = "com.ibm.as400.access.AS400JDBCDriver"
url = "jdbc:as400:DB_IP;prompt=false"

the Output charactes which i have written those i have took from the Debug in Eclipse, and even when i print them on console they are printed the same.
And yes these characters looks like japanese but they are suppose to be Double Byte Characters, but they get converted.
 
You guys haven't done this much, have ya? I suggest you study this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic