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.
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å
hex value of DB value:
Expected value = DAVE34市
hex value of expected value:
Your inputs are much appreciated in addressing this DBCS/unicode/chinese character issue.
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