IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Issues with character encoding

  • 1.  Issues with character encoding

    Posted Wed September 18, 2013 04:41 AM

    Hi All,

    Hope this post finds u all in good spirits.

    We’ve written a Java service to encode the contents of our input message. The issue we face is that for some characters we don’t get the desired output after encoding. One example is:

    ® character gets converted to “& r e g ;” instead of “& # 1 7 4 ;” (I’ve put spaces in between characters as these values will be displayed as ® only while posting; so please ignore the whitespaces)

    The Java service that we’re using uses the StringEscapeUtils.escapeHtml(str) service for encoding.

    Can anyone please suggest what’s going wrong here, or if you know the exact solution?

    Thanks & Regards
    Nishant


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 2.  RE: Issues with character encoding

    Posted Wed September 18, 2013 11:52 AM

    Can you please upload your entire JS in this thread and so users can take a look and respond?

    PS: use attachment

    Also how is the data getting passed to the inputs of JS?

    HTH,
    RMG


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: Issues with character encoding

    Posted Thu September 19, 2013 04:56 AM

    Hi All,

    I got the solution to my problem.

    I replaced the StringEscapeUtils.escapeHtml(str) method call with StringEscapeUtils.escapeXml(StringEscapeUtils.unescapeHtml(str))

    Thanks
    Nishant


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 4.  RE: Issues with character encoding

    Posted Thu September 19, 2013 11:37 AM