Topic
  • 6 replies
  • Latest Post - ‏2016-11-30T10:38:41Z by HermannSW
pkg_mmmec
pkg_mmmec
1 Post

Pinned topic Handling chinese characters in datapower

‏2013-06-20T15:59:23Z |

Hi ,

I need help on handling special characters in Datapower. Our backend is Mainframe and they are sending few fields such as name , country name in chinese characters and Datapower is failing to parse it. Mainframe is doing EBCDIC or Unicode(UTF) encoded values.

 

Sample value is from mainframe is:

<hrwgrpcityname>

   <hrwgrpcityname>$JìÌ</hrwgrpcityname>

  </hrwgrpcityname>

 

Thanks,

Pradeep

 

 

Updated on 2013-06-20T15:59:56Z at 2013-06-20T15:59:56Z by pkg_mmmec
  • HermannSW
    HermannSW
    6812 Posts

    Re: Handling chinese characters in datapower

    ‏2013-06-20T20:47:32Z  

    Hi Pradeep,

    your backend response "looks like" XML.

    But XML default encoding UTF-8, if not specified otherwise in XML declaration.

    So if your above response is UTF-8 encoded, fine.

    If it is EBCDIC-encoded it MUST have a xml declaration with matching EncodingDecl.
    And if it has, then DataPower can parse it.



    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>


     

     

  • bhumi2
    bhumi2
    2 Posts

    Re: Handling chinese characters in datapower

    ‏2016-11-30T08:33:44Z  

    Hi Herman,

    In one of  our services we are getting Chinese characters in few tags of the request (SOAP) .Further we are converting the request in customized xml and then json.During this flow Chinese characters get changed to some junk characters .

     

    But the same request is working fine when we trigger the request from SOAP UI . Actually request comes from some application outside our scope.

    Could you please help us to resolve he issue.

     

    Thanks and Regards,

    Nisha

  • NILAY97
    NILAY97
    344 Posts

    Re: Handling chinese characters in datapower

    ‏2016-11-30T08:55:36Z  
    • bhumi2
    • ‏2016-11-30T08:33:44Z

    Hi Herman,

    In one of  our services we are getting Chinese characters in few tags of the request (SOAP) .Further we are converting the request in customized xml and then json.During this flow Chinese characters get changed to some junk characters .

     

    But the same request is working fine when we trigger the request from SOAP UI . Actually request comes from some application outside our scope.

    Could you please help us to resolve he issue.

     

    Thanks and Regards,

    Nisha

    Nisha,

    Have a minimum output escaping rule in your XML Manager and test back to see if characters do not get interpreted to something else.

    Do this in your service XML Manager. Create one, if you using a default XML Manager.

    Thanks,

    Nilay

  • HermannSW
    HermannSW
    6812 Posts

    Re: Handling chinese characters in datapower

    ‏2016-11-30T10:12:14Z  
    • bhumi2
    • ‏2016-11-30T08:33:44Z

    Hi Herman,

    In one of  our services we are getting Chinese characters in few tags of the request (SOAP) .Further we are converting the request in customized xml and then json.During this flow Chinese characters get changed to some junk characters .

     

    But the same request is working fine when we trigger the request from SOAP UI . Actually request comes from some application outside our scope.

    Could you please help us to resolve he issue.

     

    Thanks and Regards,

    Nisha

    In one of  our services we are getting Chinese characters in few tags of the request (SOAP) .
    >
    Please attach (not copy in) sample data.

    > Further we are converting the request in customized xml and then json.
    >
    How, please attach a sample service export.

    > During this flow Chinese characters get changed to some junk characters .
    >
    What is "junk characters"?
    Is it entity encoded as Nilay assumes?
    Or is it what I understand as "junk"?

     

    💻  coproc2 identity.iso-8859-1.xsl <(echo '<x>1ä2ö3ü4ß5</x>') http://dp3-l3:2223; echo
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <x>1�2�3�4�5</x>
    💻  
    


    hermann.

  • bhumi2
    bhumi2
    2 Posts

    Re: Handling chinese characters in datapower

    ‏2016-11-30T10:27:17Z  
    • HermannSW
    • ‏2016-11-30T10:12:14Z

    In one of  our services we are getting Chinese characters in few tags of the request (SOAP) .
    >
    Please attach (not copy in) sample data.

    > Further we are converting the request in customized xml and then json.
    >
    How, please attach a sample service export.

    > During this flow Chinese characters get changed to some junk characters .
    >
    What is "junk characters"?
    Is it entity encoded as Nilay assumes?
    Or is it what I understand as "junk"?

     

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">💻 coproc2 identity.iso-8859-1.xsl <(echo '<x>1ä2ö3ü4ß5</x>') http://dp3-l3:2223; echo <?xml version="1.0" encoding="ISO-8859-1"?> <x>1�2�3�4�5</x> 💻 </pre>


    hermann.

    Hi Herman,

    When we trigger request from Soap UI then we are able to see ? in place of special characters at first step only.But when request is coming from application then we are able to see the exact Chinese characters and later those are converted to ........(dot).  When we checked logs at back end for failed requests then we are able to see characters like ää in place of Chinese characters.

    Thanks and Regards,

    Nisha

  • HermannSW
    HermannSW
    6812 Posts

    Re: Handling chinese characters in datapower

    ‏2016-11-30T10:38:41Z  
    • bhumi2
    • ‏2016-11-30T10:27:17Z

    Hi Herman,

    When we trigger request from Soap UI then we are able to see ? in place of special characters at first step only.But when request is coming from application then we are able to see the exact Chinese characters and later those are converted to ........(dot).  When we checked logs at back end for failed requests then we are able to see characters like ää in place of Chinese characters.

    Thanks and Regards,

    Nisha

    Thanks, please attach the requested data as well, that is needed to investigate.

    Hermann.