• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Parsing a XML file with Chinese Character in AS/400

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working on a project which require to parse a XML file (in UTF-8 encoding) and put the value into a AS/400 physical file by using JAVA. However, one of the tags in XML may contain both Traditional Chinese and Simplified Chinese characters.
The field in the physical file has already defined as DBCS (Open-type).
Now, my problem is I could only select ONE CCSID every time when I convert the byte stream back into string (for EBCDIC) in JAVA (please correct me if my understanding is wrong), for example, I am now using valueString.getBytes("CP937"). However, it seems that "CP937" does not support Simplified Chinese and if I change it to "CP935", the results is Traditional Chinese cannot be supported this time.

Could anyone advise how can I support both Traditional Chinese and Simplified Chinese? Thanks so much!
 
Marshal
Posts: 26912
82
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
Your question is "What CCSID should I choose on the i to support all varieties of Chinese characters", isn't it? So posting with that title isn't going to attract the right set of answerers.

However this article: V5R3 Advances DB2 UDB for iSeries suggests you should just use UTF-8 or UTF-16, in the form of CCSID 1208 or 1200.
 
reply
    Bookmark Topic Watch Topic
  • New Topic