Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Chinese characters are getting corrupted while usingDFHJS2LS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
hariharan.bk

New User


Joined: 29 Mar 2012
Posts: 3
Location: India

PostPosted: Tue May 05, 2020 10:51 pm    Post subject: Chinese characters are getting corrupted while usingDFHJS2LS
Reply with quote

Hi All,

We have developed a webservice having CICS as the HTTP SERVER.
This Webservice takes the input JSON (which has both English and Chinese characters) and this JSON will be converted to MF copybook. This copybook data is then stored in the DB.

We are using this proc - DFHJS2LS to enable webservices in Mainframe.
In this Proc, we have these parameters to handle the unicode.
Code:
   
CCSID=1200       
CHAR-MULTIPLIER=2.


The issue what we face now s on the chinese characters. The chinese characters which we pass in JSON are not getting converted properly and they are getting corrupted.

DB values which are getting stored is also corrupted.

For example, if we pass this in request (Harry市), this is what we get as response (Harry市).

sample DB value shared for your reference:

DB value stored = ‬‎DAVE34å
Code:
       
hex value of DB value:
00440041005600450033003400E500B800820020002000200020


Expected value = DAVE34市
Code:

hex value of expected value:
444156453334E5B882



Your inputs are much appreciated in addressing this DBCS/unicode/chinese character issue.
Back to top
View user's profile Send private message

hariharan.bk

New User


Joined: 29 Mar 2012
Posts: 3
Location: India

PostPosted: Thu May 07, 2020 1:06 am    Post subject:
Reply with quote

We are using POSTMAN to send the JSON request.

charset=UTF-8 ---> we use this charset in the POSTMAN tool.
Back to top
View user's profile Send private message
hariharan.bk

New User


Joined: 29 Mar 2012
Posts: 3
Location: India

PostPosted: Fri May 08, 2020 1:20 am    Post subject:
Reply with quote

We did a debug today and have included some more information.

The Chinese characters which we pass in JSON are not getting converted properly and they are getting corrupted when it is received inside mainframe. The conversion from UTF-8 to UTF-16 is not happening (this is my suspect).

市 - this is the chinese character passed as JSON in POSTMAN tool ..
Expected value in copybook is 5E02(UTF-16)
but we got 00E5 00B8 0082(UTF-8)

we have tried all header values and still no luck..... content type = application/json charset=UTF-8 / UTF-16
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts special characters pipes "|"... VINAY PALLELA COBOL Programming 1 Mon Jun 08, 2020 9:19 am
No new posts File transfer issue with end of line ... VINAY PALLELA TSO/ISPF 4 Thu Nov 14, 2019 12:01 am
No new posts FTP - Special characters are converte... Chinnadu TSO/ISPF 3 Tue Nov 12, 2019 6:01 pm
No new posts how to display APL characters? Pedro TSO/ISPF 7 Wed Mar 14, 2018 5:07 am
No new posts line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us